-
Notifications
You must be signed in to change notification settings - Fork 165
/
Copy pathdocker-compose.yml
596 lines (574 loc) · 19 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
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
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
services:
# base services - redis, postgres
redis:
image: redis/redis-stack:latest
container_name: redis
restart: always
ports:
- "6379:6379"
- "8001:8001"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: "5s"
volumes:
- ./docker/redis/data:/data:rw
profiles:
- redis
- base
- dev
- all
postgres:
image: postgres:15
container_name: postgres
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
PGUSER: postgres
POSTGRES_PASSWORD: postgres
ADDITIONAL_DATABASES: kratos
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres -d postgres" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- ./docker/postgres/data:/var/lib/postgresql/data:rw
- ./docker/postgres/scripts:/docker-entrypoint-initdb.d
profiles:
- postgres
- base
- dev
- all
# files service - local aws alternative, use this or file-storage
localstack:
container_name: "${LOCALSTACK_DOCKER_NAME:-localstack}"
image: localstack/localstack:latest
ports:
- "127.0.0.1:4566:4566" # LocalStack Gateway
- "127.0.0.1:4510-4559:4510-4559"
environment:
# LocalStack configuration: https://docs.localstack.cloud/references/configuration/
- LOCALSTACK_AUTH_TOKEN=${LOCALSTACK_AUTH_TOKEN:-}
- DEBUG=${DEBUG:-0}
- SERVICES=s3:4566
- HOSTNAME=localstack
- HOSTNAME_EXTERNAL=localstack
- DEFAULT_REGION=us-east-2
- DISABLE_CUSTOM_CORS_S3=true
- DISABLE_CORS_CHECKS=true
- EXTRA_CORS_ALLOWED_ORIGINS=*
volumes:
- "./docker/localstack/scripts/init-aws.sh:/etc/localstack/init/ready.d/init-aws.sh" # ready hook
- "./docker/localstack/data:/var/lib/localstack:rw"
- "/var/run/docker.sock:/var/run/docker.sock:rw"
profiles:
- base
networks:
- host
# quadratic services - client, api, multiplayer, files, connection
quadratic-client:
extends:
file: docker-compose.${ECR_OR_BUILD}.yml
service: quadratic-client
container_name: client
environment:
VITE_DEBUG: 1
VITE_QUADRATIC_API_URL: ${QUADRATIC_API_URL_EXTERNAL}
VITE_QUADRATIC_MULTIPLAYER_URL: ${QUADRATIC_MULTIPLAYER_URL_EXTERNAL}
VITE_QUADRATIC_CONNECTION_URL: ${QUADRATIC_CONNECTION_URL_EXTERNAL}
VITE_STORAGE_TYPE: ${STORAGE_TYPE}
VITE_AUTH_TYPE: ${AUTH_TYPE}
VITE_AUTH0_ISSUER: ${AUTH0_ISSUER}
VITE_AUTH0_DOMAIN: ${VITE_AUTH0_DOMAIN}
VITE_AUTH0_CLIENT_ID: ${VITE_AUTH0_CLIENT_ID}
VITE_AUTH0_AUDIENCE: ${AUTH0_AUDIENCE}
VITE_ORY_HOST: ${KRATOS_URL_EXTERNAL}
VITE_SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN}
ports:
- 3000:80
entrypoint: []
command: >
/bin/sh -c "/client/scripts/replace_env_vars.sh && nginx -g \"daemon off;\""
healthcheck:
test: [ "CMD-SHELL", "curl -f http://host.docker.internal:3000/ || exit 1" ]
interval: 10s
timeout: 5s
restart: "always"
volumes:
- ./docker/client:/client
- ./docker/client/config/nginx.conf:/etc/nginx/nginx.conf
- ./docker/client/config/default.conf:/etc/nginx/conf.d/default.conf
depends_on:
quadratic-api:
condition: service_started
profiles:
- quadratic-client
- frontend
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
quadratic-api:
extends:
file: docker-compose.${ECR_OR_BUILD}.yml
service: quadratic-api
container_name: api
environment:
CORS: ${QUADRATIC_API_CORS}
DATABASE_URL: ${DATABASE_DSN}
ENVIRONMENT: ${ENVIRONMENT}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
OPENAI_API_KEY: ${OPENAI_API_KEY}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
EXA_API_KEY: ${EXA_API_KEY}
AWS_S3_REGION: ${AWS_S3_REGION}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
AWS_S3_ANALYTICS_BUCKET_NAME: ${AWS_S3_ANALYTICS_BUCKET_NAME}
AWS_S3_ACCESS_KEY_ID: ${AWS_S3_ACCESS_KEY_ID}
AWS_S3_SECRET_ACCESS_KEY: ${AWS_S3_SECRET_ACCESS_KEY}
M2M_AUTH_TOKEN: ${M2M_AUTH_TOKEN}
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
AUTH_TYPE: ${AUTH_TYPE}
AUTH0_JWKS_URI: ${JWKS_URI}
AUTH0_ISSUER: ${AUTH0_ISSUER}
AUTH0_DOMAIN: ${AUTH0_DOMAIN}
AUTH0_CLIENT_ID: ${AUTH0_CLIENT_ID}
AUTH0_CLIENT_SECRET: ${AUTH0_CLIENT_SECRET}
AUTH0_AUDIENCE: ${AUTH0_AUDIENCE}
ORY_JWKS_URI: ${JWKS_URI}
ORY_ADMIN_HOST: ${ORY_ADMIN_HOST}
STORAGE_TYPE: ${STORAGE_TYPE}
QUADRATIC_FILE_URI: ${QUADRATIC_FILES_URL_INTERNAL}
QUADRATIC_FILE_URI_PUBLIC: ${QUADRATIC_FILES_URL_EXTERNAL}
LICENSE_KEY: ${LICENSE_KEY}
restart: "always"
ports:
- "8000:8000"
command: bash -c "npx prisma migrate deploy --schema quadratic-api/prisma/schema.prisma && npm run start:prod --workspace=quadratic-api"
depends_on:
postgres:
condition: service_healthy
profiles:
- api
- backend
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
quadratic-multiplayer:
extends:
file: docker-compose.${ECR_OR_BUILD}.yml
service: quadratic-multiplayer
container_name: multiplayer
environment:
RUST_LOG: ${QUADRATIC_MULTIPLAYER_RUST_LOG}
MULTIPLAYER__HOST: ${QUADRATIC_MULTIPLAYER_HOST}
MULTIPLAYER__PORT: ${QUADRATIC_MULTIPLAYER_PORT}
MULTIPLAYER__HEARTBEAT_CHECK_S: ${QUADRATIC_MULTIPLAYER_HEARTBEAT_CHECK_S}
MULTIPLAYER__HEARTBEAT_TIMEOUT_S: ${QUADRATIC_MULTIPLAYER_HEARTBEAT_TIMEOUT_S}
MULTIPLAYER__QUADRATIC_API_URI: ${QUADRATIC_API_URL_INTERNAL}
MULTIPLAYER__M2M_AUTH_TOKEN: ${M2M_AUTH_TOKEN}
MULTIPLAYER__ENVIRONMENT: ${ENVIRONMENT}
MULTIPLAYER__PUBSUB_HOST: ${PUBSUB_HOST}
MULTIPLAYER__PUBSUB_PORT: ${PUBSUB_PORT}
MULTIPLAYER__PUBSUB_PASSWORD: ${PUBSUB_PASSWORD}
MULTIPLAYER__PUBSUB_ACTIVE_CHANNELS: ${PUBSUB_ACTIVE_CHANNELS}
MULTIPLAYER__AUTH0_JWKS_URI: ${JWKS_URI}
MULTIPLAYER__AUTHENTICATE_JWT: true
restart: "always"
ports:
- "3001:3001"
depends_on:
redis:
condition: service_healthy
quadratic-client:
condition: service_healthy
quadratic-api:
condition: service_started
profiles:
- quadratic-multiplayer
- backend
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
quadratic-files:
extends:
file: docker-compose.${ECR_OR_BUILD}.yml
service: quadratic-files
container_name: files
environment:
RUST_LOG: ${QUADRATIC_FILES_RUST_LOG}
FILES__HOST: ${QUADRATIC_FILES_HOST}
FILES__PORT: ${QUADRATIC_FILES_PORT}
FILES__FILE_CHECK_S: ${QUADRATIC_FILES_FILE_CHECK_S}
FILES__FILES_PER_CHECK: ${QUADRATIC_FILES_FILES_PER_CHECK}
FILES__TRUNCATE_FILE_CHECK_S: ${QUADRATIC_FILES_TRUNCATE_FILE_CHECK_S}
FILES__TRUNCATE_TRANSACTION_AGE_DAYS: ${QUADRATIC_FILES_TRUNCATE_TRANSACTION_AGE_DAYS}
FILES__ENVIRONMENT: ${ENVIRONMENT}
FILES__AUTH0_JWKS_URI: ${JWKS_URI}
FILES__QUADRATIC_API_URI: ${QUADRATIC_API_URL_INTERNAL}
FILES__M2M_AUTH_TOKEN: ${M2M_AUTH_TOKEN}
FILES__PUBSUB_HOST: ${PUBSUB_HOST}
FILES__PUBSUB_PORT: ${PUBSUB_PORT}
FILES__PUBSUB_PASSWORD: ${PUBSUB_PASSWORD}
FILES__PUBSUB_ACTIVE_CHANNELS: ${PUBSUB_ACTIVE_CHANNELS}
FILES__PUBSUB_PROCESSED_TRANSACTIONS_CHANNEL: ${PUBSUB_PROCESSED_TRANSACTIONS_CHANNEL}
FILES__STORAGE_TYPE: ${STORAGE_TYPE}
FILES__AWS_S3_REGION: ${AWS_S3_REGION}
FILES__AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
FILES__AWS_S3_ACCESS_KEY_ID: ${AWS_S3_ACCESS_KEY_ID}
FILES__AWS_S3_SECRET_ACCESS_KEY: ${AWS_S3_SECRET_ACCESS_KEY}
FILES__STORAGE_DIR: ${STORAGE_DIR}
FILES__STORAGE_ENCRYPTION_KEYS: ${ENCRYPTION_KEY}
restart: "always"
ports:
- "3002:3002"
volumes:
- ./docker/file-storage:/file-storage:rw
depends_on:
redis:
condition: service_healthy
quadratic-client:
condition: service_healthy
quadratic-api:
condition: service_started
profiles:
- quadratic-files
- backend
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
quadratic-connection:
extends:
file: docker-compose.${ECR_OR_BUILD}.yml
service: quadratic-connection
container_name: connection
environment:
RUST_LOG: ${QUADRATIC_CONNECTION_RUST_LOG}
CONNECTION__HOST: ${QUADRATIC_CONNECTION_HOST}
CONNECTION__PORT: ${QUADRATIC_CONNECTION_PORT}
CONNECTION__ENVIRONMENT: ${ENVIRONMENT}
CONNECTION__AUTH0_JWKS_URI: ${JWKS_URI}
CONNECTION__QUADRATIC_API_URI: ${QUADRATIC_API_URL_INTERNAL}
CONNECTION__M2M_AUTH_TOKEN: ${M2M_AUTH_TOKEN}
CONNECTION__MAX_RESPONSE_BYTES: ${QUADRATIC_CONNECTION_MAX_RESPONSE_BYTES}
CONNECTION__STATIC_IPS: ${QUADRATIC_CONNECTION_STATIC_IPS}
restart: "always"
ports:
- "3003:3003"
depends_on:
quadratic-client:
condition: service_healthy
quadratic-api:
condition: service_started
profiles:
- quadratic-connection
- backend
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
quadratic-dev:
build:
context: .
dockerfile: Dockerfile.dev
container_name: quadratic-dev
environment:
# common
RUST_LOG: ${RUST_LOG}
# client
VITE_DEBUG: 1
VITE_QUADRATIC_API_URL: ${QUADRATIC_API_URL_EXTERNAL}
VITE_QUADRATIC_MULTIPLAYER_URL: ${QUADRATIC_MULTIPLAYER_URL_EXTERNAL}
VITE_QUADRATIC_CONNECTION_URL: ${QUADRATIC_CONNECTION_URL_EXTERNAL}
VITE_STORAGE_TYPE: ${STORAGE_TYPE}
VITE_AUTH_TYPE: ${AUTH_TYPE}
VITE_AUTH0_ISSUER: ${AUTH0_ISSUER}
VITE_AUTH0_DOMAIN: ${VITE_AUTH0_DOMAIN}
VITE_AUTH0_CLIENT_ID: ${VITE_AUTH0_CLIENT_ID}
VITE_AUTH0_AUDIENCE: ${AUTH0_AUDIENCE}
VITE_ORY_HOST: ${KRATOS_URL_EXTERNAL}
VITE_SENTRY_AUTH_TOKEN: ${SENTRY_AUTH_TOKEN}
# api
CORS: "*"
DATABASE_URL: ${DATABASE_DSN}
STRIPE_SECRET_KEY: ${STRIPE_SECRET_KEY}
STRIPE_WEBHOOK_SECRET: ${STRIPE_WEBHOOK_SECRET}
OPENAI_API_KEY: ${OPENAI_API_KEY}
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY}
EXA_API_KEY: ${EXA_API_KEY}
AWS_S3_REGION: ${AWS_S3_REGION}
AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
AWS_S3_ANALYTICS_BUCKET_NAME: ${AWS_S3_ANALYTICS_BUCKET_NAME}
AWS_S3_ACCESS_KEY_ID: ${AWS_S3_ACCESS_KEY_ID}
AWS_S3_SECRET_ACCESS_KEY: ${AWS_S3_SECRET_ACCESS_KEY}
M2M_AUTH_TOKEN: ${M2M_AUTH_TOKEN}
ENCRYPTION_KEY: ${ENCRYPTION_KEY}
AUTH_TYPE: ${AUTH_TYPE}
AUTH0_JWKS_URI: ${JWKS_URI}
AUTH0_ISSUER: ${AUTH0_ISSUER}
AUTH0_DOMAIN: ${AUTH0_DOMAIN}
AUTH0_CLIENT_ID: ${AUTH0_CLIENT_ID}
AUTH0_CLIENT_SECRET: ${AUTH0_CLIENT_SECRET}
AUTH0_AUDIENCE: ${AUTH0_AUDIENCE}
ORY_JWKS_URI: ${JWKS_URI}
ORY_ADMIN_HOST: ${ORY_ADMIN_HOST}
STORAGE_TYPE: ${STORAGE_TYPE}
QUADRATIC_FILE_URI: ${QUADRATIC_FILES_URL_INTERNAL}
QUADRATIC_FILE_URI_PUBLIC: ${QUADRATIC_FILES_URL_EXTERNAL}
LICENSE_KEY: ${LICENSE_KEY}
# multiplayer
MULTIPLAYER__HOST: ${QUADRATIC_MULTIPLAYER_HOST}
MULTIPLAYER__PORT: ${QUADRATIC_MULTIPLAYER_PORT}
MULTIPLAYER__HEARTBEAT_CHECK_S: ${QUADRATIC_MULTIPLAYER_HEARTBEAT_CHECK_S}
MULTIPLAYER__HEARTBEAT_TIMEOUT_S: ${QUADRATIC_MULTIPLAYER_HEARTBEAT_TIMEOUT_S}
MULTIPLAYER__QUADRATIC_API_URI: ${QUADRATIC_API_URL_INTERNAL}
MULTIPLAYER__M2M_AUTH_TOKEN: ${M2M_AUTH_TOKEN}
MULTIPLAYER__ENVIRONMENT: ${ENVIRONMENT}
MULTIPLAYER__PUBSUB_HOST: ${PUBSUB_HOST}
MULTIPLAYER__PUBSUB_PORT: ${PUBSUB_PORT}
MULTIPLAYER__PUBSUB_PASSWORD: ${PUBSUB_PASSWORD}
MULTIPLAYER__PUBSUB_ACTIVE_CHANNELS: ${PUBSUB_ACTIVE_CHANNELS}
MULTIPLAYER__AUTH0_JWKS_URI: ${JWKS_URI}
MULTIPLAYER__AUTHENTICATE_JWT: true
# files
FILES__HOST: ${QUADRATIC_FILES_HOST}
FILES__PORT: ${QUADRATIC_FILES_PORT}
FILES__FILE_CHECK_S: ${QUADRATIC_FILES_FILE_CHECK_S}
FILES__FILES_PER_CHECK: ${QUADRATIC_FILES_FILES_PER_CHECK}
FILES__TRUNCATE_FILE_CHECK_S: ${QUADRATIC_FILES_TRUNCATE_FILE_CHECK_S}
FILES__TRUNCATE_TRANSACTION_AGE_DAYS: ${QUADRATIC_FILES_TRUNCATE_TRANSACTION_AGE_DAYS}
FILES__ENVIRONMENT: ${ENVIRONMENT}
FILES__AUTH0_JWKS_URI: ${JWKS_URI}
FILES__QUADRATIC_API_URI: ${QUADRATIC_API_URL_INTERNAL}
FILES__M2M_AUTH_TOKEN: ${M2M_AUTH_TOKEN}
FILES__PUBSUB_HOST: ${PUBSUB_HOST}
FILES__PUBSUB_PORT: ${PUBSUB_PORT}
FILES__PUBSUB_PASSWORD: ${PUBSUB_PASSWORD}
FILES__PUBSUB_ACTIVE_CHANNELS: ${PUBSUB_ACTIVE_CHANNELS}
FILES__PUBSUB_PROCESSED_TRANSACTIONS_CHANNEL: ${PUBSUB_PROCESSED_TRANSACTIONS_CHANNEL}
FILES__STORAGE_TYPE: ${STORAGE_TYPE}
FILES__AWS_S3_REGION: ${AWS_S3_REGION}
FILES__AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME}
FILES__AWS_S3_ACCESS_KEY_ID: ${AWS_S3_ACCESS_KEY_ID}
FILES__AWS_S3_SECRET_ACCESS_KEY: ${AWS_S3_SECRET_ACCESS_KEY}
FILES__STORAGE_DIR: ${STORAGE_DIR}
FILES__STORAGE_ENCRYPTION_KEYS: ${ENCRYPTION_KEY}
# connection
CONNECTION__HOST: ${QUADRATIC_CONNECTION_HOST}
CONNECTION__PORT: ${QUADRATIC_CONNECTION_PORT}
CONNECTION__ENVIRONMENT: ${ENVIRONMENT}
CONNECTION__AUTH0_JWKS_URI: ${JWKS_URI}
CONNECTION__QUADRATIC_API_URI: ${QUADRATIC_API_URL_INTERNAL}
CONNECTION__M2M_AUTH_TOKEN: ${M2M_AUTH_TOKEN}
CONNECTION__MAX_RESPONSE_BYTES: ${QUADRATIC_CONNECTION_MAX_RESPONSE_BYTES}
CONNECTION__STATIC_IPS: ${QUADRATIC_CONNECTION_STATIC_IPS}
ports:
- "3000:3000"
- "8000:8000"
- "3001:3001"
- "3002:3002"
- "3003:3003"
volumes:
- ./:/quadratic:rw
- ./docker/file-storage:/file-storage:rw
depends_on:
redis:
condition: service_healthy
postgres:
condition: service_healthy
ory-auth:
condition: service_started
ory-auth-migrate:
condition: service_started
ory-auth-node:
condition: service_started
ory-auth-mail:
condition: service_started
profiles:
- quadratic-dev
- dev
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
tty: true
stdin_open: true
# auth service - ory
ory-auth:
image: oryd/kratos:v1.2.0
container_name: ory-auth
ports:
- "4433:4433" # public
- "4434:4434" # admin
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
volumes:
- ./docker/ory-auth/config:/etc/config/kratos
environment:
DSN: ${ORY_DSN}
LOG_LEVEL: ${ORY_LOG_LEVEL}
restart: unless-stopped
depends_on:
- postgres
- ory-auth-migrate
profiles:
- ory
- dev
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
ory-auth-migrate:
image: oryd/kratos:v1.2.0
container_name: ory-auth-migrate
command: migrate -c /etc/config/kratos/kratos.yml sql -e --yes
volumes:
- ./docker/ory-auth/config:/etc/config/kratos
environment:
DSN: ${ORY_DSN}
restart: on-failure
depends_on:
- postgres
profiles:
- ory
- dev
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
ory-auth-node:
image: oryd/kratos-selfservice-ui-node:v1.2.0
container_name: ory-auth-node
ports:
- "4455:4455"
environment:
PORT: ${KRATOS_NODE_PORT}
KRATOS_PUBLIC_URL: ${KRATOS_URL_INTERNAL}
KRATOS_BROWSER_URL: ${KRATOS_URL_EXTERNAL}
COOKIE_SECRET: ${KRATOS_COOKIE_SECRET}
CSRF_COOKIE_NAME: ${KRATOS_CSRF_COOKIE_NAME}
CSRF_COOKIE_SECRET: ${KRATOS_CSRF_COOKIE_SECRET}
restart: on-failure
depends_on:
- ory-auth
profiles:
- ory
- dev
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
ory-auth-mail:
image: oryd/mailslurper:latest-smtps
container_name: ory-auth-mail
ports:
- "1025:1025"
- "4436:4436"
- "4437:4437"
- "8080:8080"
profiles:
- ory
- dev
- all
networks:
- host
extra_hosts:
- "host.docker.internal:host-gateway"
# databases to be used for testing by the connection service - postgres, mysql, mssql
postgres-connection:
image: postgres:15
restart: always
container_name: postgres-connection
ports:
- "5433:5432"
environment:
POSTGRES_DB: postgres-connection
POSTGRES_USER: user
PGUSER: user
POSTGRES_PASSWORD: password
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U user -d postgres-connection" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- postgres-connection-data:/var/lib/postgresql/data
- ./docker/postgres-connection/scripts:/docker-entrypoint-initdb.d
profiles:
- quadratic-connection
- quadratic-connection-db
- quadratic-connection-db-postgres
mysql-connection:
image: mysql:8
restart: always
container_name: mysql-connection
ports:
- 3306:3306
environment:
MYSQL_DATABASE: mysql-connection
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_ROOT_PASSWORD: password
healthcheck:
test: [ "CMD", "mysqladmin", "ping", "-h", "localhost" ]
interval: 10s
timeout: 5s
retries: 5
volumes:
- mysql-connection-data:/var/lib/mysql
- ./docker/mysql-connection/scripts:/docker-entrypoint-initdb.d/
profiles:
- quadratic-connection
- quadratic-connection-db
- quadratic-connection-db-mysql
mssql-connection:
image: mcr.microsoft.com/mssql/server:2022-latest
restart: always
container_name: mssql-connection
user: root
ports:
- 1433:1433
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: yourStrong(!)Password
MSSQL_PID: Express
volumes:
- mssql-connection-data:/var/opt/mssql
- ./docker/mssql-connection/scripts:/docker-entrypoint-initdb.d/
healthcheck:
test: [ "CMD", "/opt/mssql-tools18/bin/sqlcmd", "-S", "localhost", "-U", "sa", "-P", "yourStrong(!)Password", "-Q", "SELECT 1", "-C", "-N", "-t", "30" ]
interval: 10s
timeout: 5s
start_period: 30s
retries: 5
command: >
bash -c " /opt/mssql/bin/sqlservr & sleep 10 && /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'yourStrong(!)Password' -i /docker-entrypoint-initdb.d/create_db.sql -C -N -t 30 && /opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'yourStrong(!)Password' -i /docker-entrypoint-initdb.d/seed_db.sql -C -N -t 30 && tail -f /dev/null"
profiles:
- quadratic-connection
- quadratic-connection-db
- quadratic-connection-db-mssql
volumes:
postgres-connection-data:
name: postgres-connection-data
driver: local
mysql-connection-data:
name: mysql-connection
driver: local
mssql-connection-data:
name: mssql-connection-data
driver: local
networks:
host: