@@ -4,7 +4,11 @@ services:
4
4
# and event log storage.
5
5
dagster-postgresql :
6
6
image : postgres:16
7
- container_name : bag3d-dagster-postgresql
7
+ container_name : bag3d-dagster-postgresql-${BAG3D_DOCKER_IMAGE_TAG}
8
+ healthcheck :
9
+ test : [ "CMD-SHELL", "pg_isready -d ${DAGSTER_POSTGRES_DB} -U ${DAGSTER_POSTGRES_USER}" ]
10
+ interval : 3s
11
+ retries : 10
8
12
environment :
9
13
POSTGRES_USER : $DAGSTER_POSTGRES_USER
10
14
POSTGRES_PASSWORD : $DAGSTER_POSTGRES_PASSWORD
@@ -23,14 +27,11 @@ services:
23
27
- pg_pswd=$BAG3D_PG_PASSWORD
24
28
- pg_db=$BAG3D_PG_DATABASE
25
29
command : ["-c", "shared_buffers=8GB", "-c", "max_connections=200", "-c", "work_mem=30MB", "-c", "logging_collector=on", "-c", "log_statement=all", "-c", "log_directory=/var/log/postgresql/"]
26
- platform : linux/amd64
27
- container_name : bag3d-data-postgresql
30
+ container_name : bag3d-data-postgresql-${BAG3D_DOCKER_IMAGE_TAG}
28
31
healthcheck :
29
- test : ["CMD-SHELL", "pg_isready -d ${BAG3D_PG_DATABASE}"]
32
+ test : ["CMD-SHELL", "pg_isready -d ${BAG3D_PG_DATABASE} -U {BAG3D_PG_USER} "]
30
33
interval : 3s
31
- retries : 10
32
- start_period : 30s
33
- timeout : 10s
34
+ retries : 20
34
35
shm_size : ' 1gb'
35
36
ports :
36
37
- " ${BAG3D_PG_PORT_ON_HOST}:5432"
@@ -62,9 +63,14 @@ services:
62
63
dockerfile : docker/pipeline/bag3d-core.dockerfile
63
64
args :
64
65
- VERSION=develop
65
- container_name : 3dbag-pipeline-core
66
66
image : 3dbag-pipeline-core:${BAG3D_DOCKER_IMAGE_TAG}
67
67
pull_policy : build
68
+ container_name : 3dbag-pipeline-core-${BAG3D_DOCKER_IMAGE_TAG}
69
+ # the port is built into the image
70
+ healthcheck :
71
+ test : ["CMD-SHELL", "dagster api grpc-health-check -p 4000"]
72
+ interval : 2s
73
+ retries : 10
68
74
restart : always
69
75
environment :
70
76
DAGSTER_CURRENT_IMAGE : " 3dbag-pipeline-core:${BAG3D_DOCKER_IMAGE_TAG}"
@@ -106,9 +112,14 @@ services:
106
112
dockerfile : docker/pipeline/bag3d-floors-estimation.dockerfile
107
113
args :
108
114
- VERSION=develop
109
- container_name : 3dbag-pipeline-floors-estimation
110
115
image : 3dbag-pipeline-floors-estimation:${BAG3D_DOCKER_IMAGE_TAG}
111
116
pull_policy : build
117
+ container_name : 3dbag-pipeline-floors-estimation-${BAG3D_DOCKER_IMAGE_TAG}
118
+ # the port is built into the image
119
+ healthcheck :
120
+ test : [ "CMD-SHELL", "dagster api grpc-health-check -p 4001" ]
121
+ interval : 2s
122
+ retries : 10
112
123
restart : always
113
124
environment :
114
125
DAGSTER_CURRENT_IMAGE : " 3dbag-pipeline-floors-estimation:${BAG3D_DOCKER_IMAGE_TAG}"
@@ -137,15 +148,21 @@ services:
137
148
- action : rebuild
138
149
path : ../packages/floors_estimation/pyproject.toml
139
150
target : /opt/3dbag-pipeline/packages/floors_estimation/pyproject.toml
151
+
140
152
bag3d-party-walls :
141
153
build :
142
154
context : ../
143
155
dockerfile : docker/pipeline/bag3d-party-walls.dockerfile
144
156
args :
145
157
- VERSION=develop
146
- container_name : 3dbag-pipeline-party-walls
147
158
image : 3dbag-pipeline-party-walls:${BAG3D_DOCKER_IMAGE_TAG}
148
159
pull_policy : build
160
+ container_name : 3dbag-pipeline-party-walls-${BAG3D_DOCKER_IMAGE_TAG}
161
+ # the port is built into the image
162
+ healthcheck :
163
+ test : [ "CMD-SHELL", "dagster api grpc-health-check -p 4002" ]
164
+ interval : 2s
165
+ retries : 10
149
166
restart : always
150
167
environment :
151
168
DAGSTER_CURRENT_IMAGE : " 3dbag-pipeline-party-walls:${BAG3D_DOCKER_IMAGE_TAG}"
@@ -183,6 +200,7 @@ services:
183
200
context : ./dagster
184
201
image : 3dgi/3dbag-pipeline-dagster:${BAG3D_DOCKER_IMAGE_TAG}
185
202
pull_policy : build
203
+ container_name : bag3d-dagster-webserver-${BAG3D_DOCKER_IMAGE_TAG}
186
204
entrypoint :
187
205
- dagster-webserver
188
206
- -h
@@ -191,7 +209,6 @@ services:
191
209
- " 3000"
192
210
- -w
193
211
- workspace.yaml
194
- container_name : bag3d-dagster-webserver
195
212
expose :
196
213
- " 3000"
197
214
ports :
@@ -204,10 +221,18 @@ services:
204
221
networks :
205
222
- bag3d-network
206
223
depends_on :
207
- - dagster-postgresql
208
- - bag3d-core
209
- - bag3d-floors-estimation
210
- - bag3d-party-walls
224
+ dagster-postgresql :
225
+ condition : service_healthy
226
+ restart : true
227
+ bag3d-core :
228
+ condition : service_healthy
229
+ restart : true
230
+ bag3d-floors-estimation :
231
+ condition : service_healthy
232
+ restart : true
233
+ bag3d-party-walls :
234
+ condition : service_healthy
235
+ restart : true
211
236
212
237
# This service runs the dagster-daemon process, which is responsible for taking runs
213
238
# off of the queue and launching them, as well as creating runs from schedules or sensors.
@@ -216,10 +241,10 @@ services:
216
241
context : ./dagster
217
242
image : 3dgi/3dbag-pipeline-dagster:${BAG3D_DOCKER_IMAGE_TAG}
218
243
pull_policy : build
244
+ container_name : bag3d-dagster-daemon-${BAG3D_DOCKER_IMAGE_TAG}
219
245
entrypoint :
220
246
- dagster-daemon
221
247
- run
222
- container_name : bag3d-dagster-daemon
223
248
restart : on-failure
224
249
env_file :
225
250
- ./.env
@@ -229,10 +254,18 @@ services:
229
254
networks :
230
255
- bag3d-network
231
256
depends_on :
232
- - dagster-postgresql
233
- - bag3d-core
234
- - bag3d-floors-estimation
235
- - bag3d-party-walls
257
+ dagster-postgresql :
258
+ condition : service_healthy
259
+ restart : true
260
+ bag3d-core :
261
+ condition : service_healthy
262
+ restart : true
263
+ bag3d-floors-estimation :
264
+ condition : service_healthy
265
+ restart : true
266
+ bag3d-party-walls :
267
+ condition : service_healthy
268
+ restart : true
236
269
237
270
volumes :
238
271
bag3d-data-postgresql :
0 commit comments