-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
126 lines (113 loc) · 3.11 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
version: '3.7'
x-worker-config-variables: &worker-config
ICIJ_WORKER_TYPE: amqp
ICIJ_WORKER_RABBITMQ_HOST: rabbitmq
ICIJ_WORKER_RABBITMQ_PORT: 5672
x-tm-amqp-config-variables: &tm-amqp-config
PASSPORT_HTTP_TASK_MANAGER__RABBITMQ_HOST: rabbitmq
PASSPORT_HTTP_TASK_MANAGER__RABBITMQ_PORT: 5672
x-async-app-variables: &async-app
PASSPORT_ASYNC_DATA_DIR: /usr/src/data
PASSPORT_ASYNC_WORK_DIR: /usr/src/data/workdir
PASSPORT_ASYNC_GOTENBERG_URL: "http://gotenberg:3000"
PASSPORT_ASYNC_LOG_LEVEL: DEBUG
x-postgres-storage-config: &tm-postgres-storage-config
PASSPORT_HTTP_TASK_MANAGER__BACKEND: amqp
# Change this to a FSKeyValueStorageConfig if you don't want to use postgres
PASSPORT_HTTP_TASK_MANAGER__STORAGE__HOST: postgres
PASSPORT_HTTP_TASK_MANAGER__STORAGE__PORT: 5432
PASSPORT_HTTP_TASK_MANAGER__STORAGE__PASSWORD: changeme
x-fs-storage-config: &tm-fs-storage-config
...
services:
gotenberg:
image: gotenberg/gotenberg:8
container_name: passport-service-test-gotenberg
healthcheck:
test: curl -f http://localhost:3000/health
interval: 5s
timeout: 2s
retries: 10
start_period: 5s
ports:
- "3000:3000"
rabbitmq:
image: rabbitmq:3.12.0-management
container_name: passport-service-rabbit-mq
healthcheck:
test: rabbitmq-diagnostics -q status
interval: 5s
timeout: 2s
retries: 10
start_period: 5s
ports:
- "5672:5672"
- "15672:15672"
postgres:
image: postgres
container_name: passport-service-postgres
environment:
POSTGRES_PASSWORD: changeme
healthcheck:
test: pg_isready
interval: 2s
timeout: 2s
retries: 10
start_period: 5s
ports:
- "5435:5432"
service:
depends_on:
rabbitmq:
condition: service_healthy
postgres:
condition: service_healthy
build:
context: .
target: passport-service
args:
dbmate_arch: ${DBMATE_ARCH}
environment:
<<: [ *tm-amqp-config, *tm-postgres-storage-config ]
# If you don't want to use postgres use: <<: [*worker-config, *tm-fs-storage-config]
PASSPORT_HTTP_PORT: 8080
healthcheck:
test: curl -f http://localhost:8080/version # TODO: update this with the health/ping route
interval: 5s
timeout: 2s
retries: 10
start_period: 5s
ports:
- "8080:8080"
preprocessing-worker:
depends_on:
rabbitmq:
condition: service_healthy
gotenberg:
condition: service_healthy
service:
condition: service_healthy
build:
context: .
target: preprocessing-worker
environment:
<<: [ *worker-config, *async-app ]
volumes:
- type: bind
source: ./data
target: /usr/src/data
inference-worker:
depends_on:
rabbitmq:
condition: service_healthy
service:
condition: service_started
build:
context: .
target: inference-worker-cpu
environment:
<<: [ *worker-config, *async-app ]
volumes:
- type: bind
source: ./data
target: /usr/src/data