-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathm3-deployment.yml
125 lines (121 loc) · 3.33 KB
/
m3-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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
apiVersion: apps/v1
kind: Deployment
metadata:
name: m3-mobiles-deployment
labels:
app: m3-mobiles
spec:
replicas: 1
selector:
matchLabels:
app: m3-mobiles
template:
metadata:
labels:
app: m3-mobiles
spec:
volumes:
- name: m3-mobiles-assets-vol
hostPath:
path: /home/docker/m3mobiles/assets
- name: m3-mobiles-media-vol
hostPath:
path: /home/docker/m3mobiles/media
containers:
- name: m3-mobiles
image: amjedsaleel/m3mobiles
volumeMounts:
- name: m3-mobiles-assets-vol
mountPath: /app/assets
- name: m3-mobiles-media-vol
mountPath: /app/media
ports:
- containerPort: 8000
# livenessProbe:
# httpGet:
# path: /
# port: 8000
# initialDelaySeconds: 3
# failureThreshold: 1
# periodSeconds: 10
startupProbe:
httpGet:
path: /
port: 8000
initialDelaySeconds: 3
failureThreshold: 1
periodSeconds: 5
env:
- name: SECRET_KEY
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: secret-key
- name: DEBUG
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: debug
- name: DB_NAME
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: db-name
- name: DB_USER
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: db-user
- name: DB_PASSWORD
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: db-password
- name: DB_HOST
valueFrom:
configMapKeyRef:
name: m3-mobiles-config-map
key: postgres_db_url
- name: DB_PORT
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: db-port
- name: TWILIO_ACCOUNT_SID
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: twilio-account-sid
- name: TWILIO_AUTH_TOKEN
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: twilio_auth_token
- name: VERIFICATION_SID
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: verification-sid
- name: RAZOR_KEY_ID
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: razor-key-id
- name: RAZOR_KEY_SECRET
valueFrom:
secretKeyRef:
name: m3-mobiles-secret
key: razor-key-secrete
---
apiVersion: v1
kind: Service
metadata:
name: m3-mobiles-service
spec:
selector:
app: m3-mobiles
# type: LoadBalancer
ports:
- protocol: TCP
port: 8080
targetPort: 8000