Skip to content
Snippets Groups Projects
Commit e2ed0a6c authored by Eunhak Lee's avatar Eunhak Lee
Browse files

feat: deploy infra

parent 2cc8b543
No related branches found
No related tags found
No related merge requests found
......@@ -14,10 +14,14 @@ spec:
containers:
- name: backend
image: git.ajou.ac.kr:5050/meanspec/meanspec-backend:latest
imagePullPolicy: Always
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "128Mi"
cpu: "500m"
memory: "2Gi"
cpu: "1"
ports:
- containerPort: 8000
env:
......@@ -42,3 +46,4 @@ spec:
ports:
- port: 8000
targetPort: 8000
type: NodePort
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
spec:
selector:
matchLabels:
app: backend
template:
metadata:
labels:
app: backend
spec:
containers:
- name: backend
image: git.ajou.ac.kr:5050/meanspec/meanspec-backend:latest
resources:
requests:
memory: "64Mi"
cpu: "100m"
limits:
memory: "2Gi"
cpu: "1"
ports:
- containerPort: 8000
env:
- name: JWT_SECRET
value: jwtsecret
- name: DB_HOST
value: postgres
- name: DB_USER
value: meanspec
- name: DB_PASSWORD
value: foopassword123
- name: REDIS_URL
value: redis://redis
---
apiVersion: v1
kind: Service
metadata:
name: backend
spec:
selector:
app: backend
ports:
- port: 8000
targetPort: 8000
type: NodePort
......@@ -7,10 +7,10 @@ metadata:
spec:
containers:
- name: entry
image: ubuntu:latest
image: node:20
command: ["/bin/bash", "-c", "--"]
args: ["while true; do sleep 30; done;"]
resources:
limits:
memory: "128Mi"
cpu: "500m"
# resources:
# limits:
# memory: "128Mi"
# cpu: "500m"
......@@ -9,6 +9,7 @@ spec:
containers:
- name: frontend-dropper
image: git.ajou.ac.kr:5050/meanspec/meanspec-frontend:latest
imagePullPolicy: Always
command: ["sh", "-c"]
args: ["/bin/echo \"cp -r /app/* /workdir\" > /entrypoint.sh ; chmod +x /entrypoint.sh ; /entrypoint.sh"]
resources:
......
......@@ -15,6 +15,7 @@ spec:
containers:
- name: hwinfo
image: git.ajou.ac.kr:5050/meanspec/meanspec-hwinfo-daemon:latest
imagePullPolicy: Always
env:
- name: REDIS_URL
value: redis://redis
......@@ -22,7 +23,17 @@ spec:
value: postgres
- name: PARSE_DAEMON_REFRESH_INTERVAL
value: "1"
- name: HWINFO_HACKNOTE_FILE
value: "/data/hacknote.json"
resources:
limits:
memory: "64Mi"
cpu: "100m"
volumeMounts:
- name: hacknote
mountPath: /data
volumes:
- name: hacknote
hostPath:
path: /home/enak/meanspec/hwinfo
type: DirectoryOrCreate
......@@ -28,5 +28,5 @@ spec:
value: "60"
resources:
limits:
memory: "64Mi"
cpu: "100m"
memory: "32Mi"
cpu: "10m"
......@@ -37,9 +37,12 @@ spec:
- name: nginx
image: return0927/nginx:1.19.3-hakase
resources:
requests:
memory: "1Gi"
cpu: "1"
limits:
memory: "128Mi"
cpu: "500m"
memory: "4Gi"
cpu: "6"
ports:
- containerPort: 80
volumeMounts:
......
......@@ -40,7 +40,7 @@ spec:
- name: postgres-init-scripts
mountPath: /docker-entrypoint-initdb.d
- name: postgres-data
mountPath: /var/lib/postgres/data
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres-init-scripts
hostPath:
......@@ -57,6 +57,8 @@ metadata:
spec:
selector:
name: postgres
type: NodePort
ports:
- port: 5432
nodePort: 30432
targetPort: 5432
......@@ -16,8 +16,8 @@ spec:
image: redis:7.4.1-alpine
resources:
limits:
memory: "128Mi"
cpu: "500m"
memory: "1Gi"
cpu: "1"
---
apiVersion: v1
kind: Service
......@@ -26,6 +26,8 @@ metadata:
spec:
selector:
app: redis-cluster
type: NodePort
ports:
- port: 6379
nodePort: 30379
targetPort: 6379
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment