-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathcompose.yaml
More file actions
390 lines (362 loc) · 8.97 KB
/
compose.yaml
File metadata and controls
390 lines (362 loc) · 8.97 KB
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
name: st-messages
services:
postgresql:
image: postgres:16.6
ports:
- "8912:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 1s
timeout: 2s
retries: 300
env_file:
- env.d/development/postgresql.defaults
- env.d/development/postgresql.local
redis:
image: redis:5
ports:
- "8913:6379"
opensearch:
image: opensearchproject/opensearch:2.19.2
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
- "DISABLE_INSTALL_DEMO_CONFIG=true"
- "DISABLE_SECURITY_PLUGIN=true"
# - http.cors.enabled=true
# - "http.cors.allow-origin=/.*/"
ports:
- "8914:9200" # REST API
- "8915:9600" # Performance Analyzer
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9200"]
interval: 1s
timeout: 5s
retries: 60
ulimits:
memlock:
soft: -1 # Set memlock to unlimited (no soft or hard limit)
hard: -1
nofile:
soft: 65536 # Maximum number of open files for the opensearch user - set to at least 65536
hard: 65536
mailcatcher:
image: maildev/maildev:2.2.1
ports:
- "8904:1080"
- "8917:1025"
objectstorage:
# user: ${DOCKER_USER:-1000}
image: rustfs/rustfs:1.0.0-alpha.83
environment:
- RUSTFS_ACCESS_KEY=st-messages
- RUSTFS_SECRET_KEY=password
- RUSTFS_CONSOLE_ENABLE=true
- RUSTFS_ADDRESS=0.0.0.0:9000
- RUSTFS_CONSOLE_ADDRESS=0.0.0.0:9001
- RUSTFS_CORS_ALLOWED_ORIGINS=*
- RUSTFS_CONSOLE_CORS_ALLOWED_ORIGINS=*
ports:
- "8906:9000"
- "8907:9001"
healthcheck:
test:
[
"CMD",
"sh",
"-c",
"curl -f http://127.0.0.1:9000/health && curl -f http://127.0.0.1:9001/rustfs/console/health",
]
interval: 1s
timeout: 5s
retries: 60
start_period: 0s
volumes:
- objectstorage-data:/data
backend-base:
build:
context: src/backend
target: runtime-dev
args:
DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000}
volumes:
- ./src/backend:/app
- ./data/static:/data/static
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request as u; u.urlopen('http://localhost:8000/__heartbeat__/', timeout=1)"]
interval: 3s
retries: 3
start_period: 10s
backend-dev:
extends: backend-base
environment:
- PYLINTHOME=/app/.pylint.d
- DJANGO_CONFIGURATION=Development
env_file:
- env.d/development/backend.defaults
- env.d/development/backend.local
ports:
- "8901:8000"
depends_on:
postgresql:
condition: service_healthy
# restart: true
objectstorage:
condition: service_healthy
redis:
condition: service_started
opensearch:
condition: service_healthy
keycloak:
condition: service_started
mailcatcher:
condition: service_started
backend-db:
extends: backend-base
profiles:
- tools
environment:
- DJANGO_CONFIGURATION=DevelopmentMinimal
env_file:
- env.d/development/backend.defaults
- env.d/development/backend.local
ports:
- "8901:8000"
depends_on:
postgresql:
condition: service_healthy
# restart: true
backend-uv:
profiles:
- tools
volumes:
- ./src/backend:/app
build:
context: src/backend/
target: uv
pull_policy: build
worker-dev:
build:
context: src/backend
target: runtime-dev
args:
DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000}
command: ["python", "worker.py", "--loglevel=DEBUG"]
environment:
- DJANGO_CONFIGURATION=Development
env_file:
- env.d/development/backend.defaults
- env.d/development/backend.local
volumes:
- ./src/backend:/app
- ./data/static:/data/static
depends_on:
- backend-dev
worker-ui:
build:
context: src/backend
target: runtime-dev
args:
DOCKER_USER: ${DOCKER_USER:-1000}
user: ${DOCKER_USER:-1000}
depends_on:
- redis
environment:
- FLOWER_UNAUTHENTICATED_API=true
- DJANGO_CONFIGURATION=Development
env_file:
- env.d/development/backend.defaults
- env.d/development/backend.local
volumes:
- ./src/backend:/app
ports:
- "8903:8803"
command: celery -A messages.celery_app flower --port=8803
frontend-base:
user: "${DOCKER_USER:-1000}"
build:
context: ./src/frontend
dockerfile: Dockerfile
target: frontend-deps
args:
DOCKER_USER: ${DOCKER_USER:-1000}
frontend-dev:
extends: frontend-base
env_file:
- env.d/development/frontend.defaults
- env.d/development/frontend.local
command: ["npm", "run", "dev"]
volumes:
- ./src/frontend/:/home/frontend/
ports:
- "8900:3000"
frontend-tools:
extends: frontend-base
profiles:
- frontend-tools
volumes:
- ./src/backend/core/api/openapi.json:/home/backend/core/api/openapi.json
- ./src/frontend/:/home/frontend/
frontend-tools-amd64:
extends: frontend-tools
platform: linux/amd64
crowdin:
image: crowdin/cli:4.11.0
volumes:
- ".:/app"
env_file:
- env.d/development/crowdin.defaults
- env.d/development/crowdin.local
user: "${DOCKER_USER:-1000}"
working_dir: /app
mta-in:
build:
context: src/mta-in
target: runtime-prod
env_file:
- env.d/development/mta-in.defaults
- env.d/development/mta-in.local
ports:
- "8910:25"
depends_on:
- backend-dev
mta-in-test:
profiles:
- tools
build:
context: src/mta-in
target: runtime-dev
env_file:
- env.d/development/mta-in.defaults
- env.d/development/mta-in.local
environment:
- EXEC_CMD=true
- MDA_API_BASE_URL=http://localhost:8000/api/mail/
- MTA_HOST=localhost
command: pytest -vvs tests/
volumes:
- ./src/mta-in:/app
mta-in-uv:
profiles:
- tools
volumes:
- ./src/mta-in:/app
build:
context: src/mta-in
target: uv
pull_policy: build
mta-out:
build:
context: src/mta-out
target: runtime-prod
env_file:
- env.d/development/mta-out.defaults
- env.d/development/mta-out.local
ports:
- "8911:587"
depends_on:
mailcatcher:
condition: service_started
mta-out-test:
profiles:
- tools
build:
context: src/mta-out
target: runtime-dev
env_file:
- env.d/development/mta-out.defaults
- env.d/development/mta-out.local
environment:
- EXEC_CMD=true
- MTA_OUT_SMTP_HOST=localhost:587
- MTA_OUT_SMTP_USERNAME=user
- MTA_OUT_SMTP_PASSWORD=pass
- SMTP_RELAY_HOST=localhost:2525
command: pytest -vvs tests/
volumes:
- ./src/mta-out:/app
socks-proxy:
build:
context: src/socks-proxy
target: runtime
env_file:
- env.d/development/socks-proxy.defaults
- env.d/development/socks-proxy.local
ports:
- "8916:1080"
socks-proxy-test:
profiles:
- tools
build:
context: src/socks-proxy/tests
environment:
- SOCKS_PROXY1=user1:pwd1@socks-proxy:1080
- SOCKS_PROXY2=user2:pwd2@socks-proxy:1080
depends_on:
socks-proxy:
condition: service_started
mta-out-uv:
profiles:
- tools
volumes:
- ./src/mta-out:/app
build:
context: src/mta-out
target: uv
pull_policy: build
keycloak:
image: quay.io/keycloak/keycloak:26.5.4
volumes:
- ./src/keycloak/realm.json:/opt/keycloak/data/import/realm.json:ro
- ./src/keycloak/themes/dsfr-2.2.1.jar:/opt/keycloak/providers/keycloak-theme.jar:ro
environment:
- HOST=http://localhost:8902
- ADMIN_HOST=http://localhost:8902
command:
- start-dev
- --features=preview
- --import-realm
- --proxy-headers=xforwarded
- --http-enabled=true
- --hostname=$${HOST}
- --hostname-admin=$${ADMIN_HOST}
- --http-port=8802
env_file:
- env.d/development/keycloak.defaults
- env.d/development/keycloak.local
ports:
- "8902:8802"
depends_on:
- postgresql
mpa:
build:
context: src/mpa/rspamd
environment:
- RSPAMD_password=password
- PORT=8010
ports:
- "8918:8010"
depends_on:
redis:
condition: service_started
mpa-test:
profiles:
- tools
build:
context: src/mpa/tests
environment:
- RSPAMD_URL=http://mpa:8010/_api
- RSPAMD_AUTH=Bearer password
command: pytest -vvs tests/
volumes:
- ./src/mpa/tests:/app/tests
depends_on:
mpa:
condition: service_started
redis:
condition: service_started
volumes:
objectstorage-data: