forked from UTSCC09/project-horizon
-
Notifications
You must be signed in to change notification settings - Fork 0
/
deployment.yml
79 lines (78 loc) · 1.44 KB
/
deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
apiVersion: v1
kind: Service
metadata:
name: nginx
spec:
selector:
app: horizon
tier: frontend
ports:
- port: 80
targetPort: 80
protocol: TCP
---
apiVersion: v1
kind: Service
metadata:
name: nestjs
spec:
selector:
component: backend
ports:
- port: 3000
targetPort: 3000
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: backend
spec:
replicas: 1
selector:
matchLabels:
component: backend
template:
metadata:
labels:
component: backend
spec:
containers:
- name: backend
image: gcr.io/horizon-c09/backend:latest
imagePullPolicy: "Always"
readinessProbe:
httpGet:
path: "/health"
port: 3000
ports:
- containerPort: 3000
volumeMounts:
- name: backend-pv-volume
mountPath: /tmp/uploads
volumes:
- name: backend-pv-volume
persistentVolumeClaim:
claimName: backend-pv-claim
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: frontend
spec:
replicas: 1
selector:
matchLabels:
app: horizon
tier: frontend
template:
metadata:
labels:
app: horizon
tier: frontend
spec:
containers:
- name: frontend
image: gcr.io/horizon-c09/frontend:latest
imagePullPolicy: "Always"
ports:
- containerPort: 80