-
Notifications
You must be signed in to change notification settings - Fork 58
/
docker-compose.yml
300 lines (284 loc) · 6.72 KB
/
docker-compose.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
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
services:
rabbitmq:
restart: unless-stopped
image: "docker.io/library/rabbitmq:3.12-management"
ports:
- "127.0.0.1:5672:5672"
- "127.0.0.1:15672:15672"
healthcheck:
test: ["CMD", "rabbitmqctl", "status"]
interval: 5s
retries: 10
env_file:
- .env-defaults
- .env
postgres:
restart: unless-stopped
image: docker.io/library/postgres:15
shm_size: 256MB
ports:
- "127.0.0.1:5432:5432"
healthcheck:
test: ["CMD", "gosu", "postgres", "pg_isready"]
interval: 10s
retries: 10
# Django runserver does not limit the number of threads. We need to increase
# the maximum number of connection to make sure that we don't hit the limit.
command: -c max_connections=500
volumes:
- postgres-data:/var/lib/postgresql/data
- ./init-user-db.sh:/docker-entrypoint-initdb.d/init-user-db.sh
env_file:
- .env-defaults
- .env
environment:
APPS: "ROCKY BYTES KATALOGUS SCHEDULER"
crux:
image: "ghcr.io/dekkers/xtdb-http-multinode:main"
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
volumes:
- xtdb-data:/var/lib/xtdb
octopoes_api:
restart: unless-stopped
depends_on:
crux:
condition: service_started
rabbitmq:
condition: service_healthy
ports:
- "127.0.0.1:8001:80"
build:
context: octopoes/
target: dev
args:
ENVIRONMENT: dev
command: uvicorn octopoes.api.api:app --host 0.0.0.0 --port 80 --reload --reload-dir /app/octopoes/octopoes
env_file:
- .env-defaults
- .env
volumes:
- ./octopoes:/app/octopoes
octopoes_api_worker:
restart: unless-stopped
depends_on:
crux:
condition: service_started
rabbitmq:
condition: service_healthy
build:
context: octopoes/
target: dev
args:
ENVIRONMENT: dev
command: worker-beat
env_file:
- .env-defaults
- .env
volumes:
- ./octopoes:/app/octopoes
ulimits:
nofile:
soft: 262144
hard: 262144
boefje:
restart: unless-stopped
depends_on:
- rabbitmq
- bytes
ports:
- "127.0.0.1:8006:8000"
build:
context: .
dockerfile: boefjes/Dockerfile
target: dev
args:
ENVIRONMENT: dev
volumes:
- ./boefjes:/app/boefjes
- ./octopoes/octopoes:/app/boefjes/octopoes
- /var/run/docker.sock:/var/run/docker.sock
deploy:
replicas: 1
command: boefje
env_file:
- .env-defaults
- .env
environment:
- BOEFJES_DOCKER_NETWORK=${COMPOSE_PROJECT_NAME:-nl-kat-coordination}_default
normalizer:
restart: unless-stopped
depends_on:
- rabbitmq
- bytes
build:
context: .
dockerfile: boefjes/Dockerfile
target: dev
args:
ENVIRONMENT: dev
volumes:
- ./boefjes:/app/boefjes
- ./octopoes/octopoes:/app/boefjes/octopoes
deploy:
replicas: 1
command: normalizer
env_file:
- .env-defaults
- .env
rocky:
restart: unless-stopped
depends_on:
- postgres
ports:
- "127.0.0.1:8000:8000"
build:
context: .
dockerfile: rocky/Dockerfile
target: dev
args:
ENVIRONMENT: dev
command: python3 manage.py runserver 0.0.0.0:8000
volumes:
- ./rocky:/app/rocky
- ./octopoes/octopoes:/app/rocky/octopoes
env_file:
- .env-defaults
- .env
environment:
- GITPOD_WORKSPACE_URL=${GITPOD_WORKSPACE_URL:-}
- GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN=${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN:-}
rocky_worker:
restart: unless-stopped
depends_on:
- postgres
build:
context: .
dockerfile: rocky/Dockerfile
target: dev
args:
ENVIRONMENT: dev
command: worker
volumes:
- ./rocky:/app/rocky
- ./octopoes/octopoes:/app/rocky/octopoes
env_file:
- .env-defaults
- .env
environment:
- GITPOD_WORKSPACE_URL=${GITPOD_WORKSPACE_URL:-}
- GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN=${GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN:-}
bytes:
restart: unless-stopped
depends_on:
- postgres
ports:
- "127.0.0.1:8002:8000"
build:
context: bytes/
target: dev
args:
ENVIRONMENT: dev
command: uvicorn bytes.api:app --host 0.0.0.0 --port 8000 --reload --reload-dir /app/bytes/bytes
volumes:
- ./bytes:/app/bytes
- bytes-data:/data
env_file:
- .env-defaults
- .env
katalogus:
restart: unless-stopped
depends_on:
- postgres
build:
context: .
dockerfile: boefjes/Dockerfile
target: dev
args:
ENVIRONMENT: dev
command: uvicorn boefjes.katalogus.root:app --host 0.0.0.0 --port 8000 --reload --reload-dir /app/boefjes/boefjes/katalogus
volumes:
- ./boefjes:/app/boefjes
- ./octopoes/octopoes:/app/boefjes/octopoes
ports:
- "127.0.0.1:8003:8000"
env_file:
- .env-defaults
- .env
scheduler:
restart: unless-stopped
build:
context: mula/
target: dev
args:
ENVIRONMENT: dev
ports:
- "127.0.0.1:8004:8000"
env_file:
- .env-defaults
- .env
volumes:
- ./mula:/app/scheduler
depends_on:
- postgres
- rabbitmq
- boefje
- normalizer
- octopoes_api
- katalogus
keiko:
restart: unless-stopped
build:
context: keiko/
target: dev
ports:
- "127.0.0.1:8005:8000"
command: uvicorn keiko.app:api --host 0.0.0.0 --port 8000 --reload --reload-dir /app/keiko/keiko
env_file:
- .env-defaults
- .env
volumes:
- ./keiko:/app/keiko
- keiko-reports:/reports
jaeger:
profiles:
- monitoring
restart: unless-stopped
image: docker.io/jaegertracing/all-in-one:1.48
environment:
COLLECTOR_ZIPKIN_HOST_PORT: 9411
COLLECTOR_OTLP_ENABLED: "true"
SPAN_STORAGE_TYPE: badger
BADGER_EPHEMERAL: "false"
BADGER_DIRECTORY_VALUE: /badger/data
BADGER_DIRECTORY_KEY: /badger/key
volumes:
- jaeger-data:/badger
ports:
- "127.0.0.1:16686:16686"
prometheus:
profiles:
- monitoring
restart: unless-stopped
image: docker.io/prom/prometheus:v2.50.1
ports:
- "127.0.0.1:9090:9090"
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus-data:/prometheus
networks:
default:
enable_ipv6: true
ipam:
config:
- subnet: fc42:ca7::/64
- subnet: 172.30.0.0/16
gateway: 172.30.0.1
volumes:
postgres-data:
bytes-data:
keiko-reports:
xtdb-data:
jaeger-data:
prometheus-data: