This repository has been archived by the owner on Jan 2, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-deployment.yaml
183 lines (183 loc) · 5.16 KB
/
azure-deployment.yaml
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
name: specr
apiVersion: '2019-12-01'
location: westeurope
properties:
containers:
- name: cms
properties:
image: specr.azurecr.io/specr:deployment
ports:
- protocol: TCP
port: 8000
environmentVariables:
- name: POSTGRES_HOST
value: specr.postgres.database.azure.com
- name: POSTGRES_DB
value: specr
- name: POSTGRES_PASSWORD
secureValue: 9CBDvedK8nQU3vzVLvZZ
- name: POSTGRES_USER
value: specr@specr
- name: DJANGO_SETTINGS_MODULE
value: cms.production
- name: SECRET_KEY
secureValue: JghWZgWM3K
- name: CELERY_BROKER
value: amqp://guest:guest@localhost:5672//
resources:
requests:
cpu: 1
memoryInGb: 1.5
limits:
cpu: 1
memoryInGb: 3
volumeMounts:
- name: cms-media
mountPath: /app/cms/media
readOnly: False
- name: caddy
properties:
image: caddy
ports:
- protocol: TCP
port: 80
- protocol: TCP
port: 443
resources:
requests:
cpu: 0.5
memoryInGb: 0.5
limits:
cpu: 0.5
memoryInGb: 0.5
volumeMounts:
- name: caddy-data
mountPath: /data
readOnly: False
command: ["caddy", "reverse-proxy", "--from", "app.specr.ie", "--to", "localhost:8000"]
- name: celery-worker
properties:
image: specr.azurecr.io/specr:deployment
command: ["celery", "-A", "cms", "worker", "-l", "DEBUG", "--concurrency", "1", "--events"]
environmentVariables:
- name: POSTGRES_HOST
value: specr.postgres.database.azure.com
- name: POSTGRES_DB
value: specr
- name: POSTGRES_PASSWORD
secureValue: 9CBDvedK8nQU3vzVLvZZ
- name: POSTGRES_USER
value: specr@specr
- name: DJANGO_SETTINGS_MODULE
value: cms.production
- name: SECRET_KEY
secureValue: JghWZgWM3K
- name: CELERY_BROKER
value: amqp://guest:guest@localhost:5672//
resources:
requests:
cpu: 0.5
memoryInGb: 1
limits:
cpu: 1
memoryInGb: 1.5
volumeMounts:
- name: cms-media
mountPath: /app/cms/media
readOnly: False
- name: celery-beat
properties:
image: specr.azurecr.io/specr:deployment
command: ["celery", "-A", "cms", "beat", "-l", "DEBUG"]
environmentVariables:
- name: POSTGRES_HOST
value: specr.postgres.database.azure.com
- name: POSTGRES_DB
value: specr
- name: POSTGRES_PASSWORD
secureValue: 9CBDvedK8nQU3vzVLvZZ
- name: POSTGRES_USER
value: specr@specr
- name: DJANGO_SETTINGS_MODULE
value: cms.production
- name: SECRET_KEY
secureValue: JghWZgWM3K
- name: CELERY_BROKER
value: amqp://guest:guest@localhost:5672//
resources:
requests:
cpu: 0.5
memoryInGb: 1
limits:
cpu: 0.5
memoryInGb: 1.5
- name: celery-broker
properties:
image: rabbitmq:3.8.5-alpine
ports:
- protocol: TCP
port: 5672
resources:
requests:
cpu: 0.5
memoryInGb: 1
limits:
cpu: 0.5
memoryInGb: 1.5
imageRegistryCredentials:
- server: specr.azurecr.io
username: specr
password: CsjRcUfrA3spZSNC5LgM304S=8j+MvNW
restartPolicy: OnFailure
ipAddress:
ports:
- protocol: TCP
port: 80
- protocol: TCP
port: 443
type: Public
dnsNameLabel: specr
osType: Linux
volumes:
- name: cms-media
azureFile:
shareName: cms-media
readOnly: false
storageAccountName: specr
storageAccountKey: b8EoRls83maUX9IBr33mS6dkrxKmTKq2bInYEVQwICnx8H7gQ/rCGNRk0Qp+shAc/q7LrQJ0SZ7grKUQaUaGZA==
- name: redis-data
azureFile:
shareName: redis-data
readOnly: false
storageAccountName: specr
storageAccountKey: b8EoRls83maUX9IBr33mS6dkrxKmTKq2bInYEVQwICnx8H7gQ/rCGNRk0Qp+shAc/q7LrQJ0SZ7grKUQaUaGZA==
- name: caddy-data
azureFile:
shareName: caddy-data
readOnly: false
storageAccountName: specr
storageAccountKey: b8EoRls83maUX9IBr33mS6dkrxKmTKq2bInYEVQwICnx8H7gQ/rCGNRk0Qp+shAc/q7LrQJ0SZ7grKUQaUaGZA==
initContainers:
- name: migrate
properties:
image: specr.azurecr.io/specr:deployment
command: ["python", "manage.py", "migrate"]
environmentVariables:
- name: POSTGRES_HOST
value: specr.postgres.database.azure.com
- name: POSTGRES_DB
value: specr
- name: POSTGRES_PASSWORD
secureValue: 9CBDvedK8nQU3vzVLvZZ
- name: POSTGRES_USER
value: specr@specr
- name: DJANGO_SETTINGS_MODULE
value: cms.production
- name: SECRET_KEY
secureValue: JghWZgWM3K
- name: CELERY_BROKER
value: amqp://guest:guest@localhost:5672//
volumeMounts:
- name: cms-media
mountPath: /app/cms/media
readOnly: False