Skip to content

Commit 929618f

Browse files
committed
Sync development flavors to expose env variable ports, except for FTPS passive
ports, which we cannot just pass on the different range format. Require devdns to be started in order for daemons to lookup IP of domain to listen on.
1 parent 8e317df commit 929618f

File tree

2 files changed

+78
-20
lines changed

2 files changed

+78
-20
lines changed

docker-compose_development.yml

+42-12
Original file line numberDiff line numberDiff line change
@@ -156,10 +156,15 @@ services:
156156
# openid sftp sftpsubsys webdavs ftps notify imnotify vmproxy
157157
RUN_SERVICES: openid rsyslogd
158158
depends_on:
159-
- migrid
159+
# IMPORTANT: daemons may require DNS to bind to domain ports
160+
devdns:
161+
condition: service_started
162+
# IMPORTANT: finish volume init before launch as explained above
163+
migrid-volume-init:
164+
condition: service_completed_successfully
160165
ports:
161166
# NOTE: expose the unique raw port(s) to host
162-
- "8443:8443"
167+
- "${OPENID_PORT}:${OPENID_PORT}"
163168
networks:
164169
default:
165170
aliases:
@@ -201,11 +206,16 @@ services:
201206
# openid sftp sftpsubsys webdavs ftps notify imnotify vmproxy
202207
RUN_SERVICES: sftp sftpsubsys rsyslogd
203208
depends_on:
204-
- migrid
209+
# IMPORTANT: daemons may require DNS to bind to domain ports
210+
devdns:
211+
condition: service_started
212+
# IMPORTANT: finish volume init before launch as explained above
213+
migrid-volume-init:
214+
condition: service_completed_successfully
205215
ports:
206216
# NOTE: expose the unique raw port(s) to host
207-
- "2222:2222"
208-
- "22222:22222"
217+
- "${SFTP_PORT}:${SFTP_PORT}"
218+
- "${SFTP_SUBSYS_PORT}:${SFTP_SUBSYS_PORT}"
209219
networks:
210220
default:
211221
aliases:
@@ -251,11 +261,20 @@ services:
251261
# openid sftp sftpsubsys webdavs ftps notify imnotify vmproxy
252262
RUN_SERVICES: ftps rsyslogd
253263
depends_on:
254-
- migrid
264+
# IMPORTANT: daemons may require DNS to bind to domain ports
265+
devdns:
266+
condition: service_started
267+
# IMPORTANT: finish volume init before launch as explained above
268+
migrid-volume-init:
269+
condition: service_completed_successfully
255270
ports:
256-
# NOTE: expose the unique raw port(s) to host
257-
- "8021:8021"
258-
- "8100-8399:8100-8399"
271+
# NOTE: expose the unique raw port(s) to host
272+
- "${FTPS_CTRL_PORT}:${FTPS_CTRL_PORT}"
273+
# IMPORTANT: FTPS_PASV_PORTS is colon-separated but range needs hyphen
274+
# NOTE: compose does not support shell-style replacement so we can't use
275+
#- "${FTPS_PASV_PORTS/:/-}:${FTPS_PASV_PORTS/:/-}"
276+
# hard-code them for now.
277+
- "8100-8399"
259278
networks:
260279
default:
261280
aliases:
@@ -301,10 +320,15 @@ services:
301320
# openid sftp sftpsubsys webdavs ftps notify imnotify vmproxy
302321
RUN_SERVICES: webdavs rsyslogd
303322
depends_on:
304-
- migrid
323+
# IMPORTANT: daemons may require DNS to bind to domain ports
324+
devdns:
325+
condition: service_started
326+
# IMPORTANT: finish volume init before launch as explained above
327+
migrid-volume-init:
328+
condition: service_completed_successfully
305329
ports:
306330
# NOTE: expose the unique raw port(s) to host
307-
- "4443:4443"
331+
- "${DAVS_PORT}:${DAVS_PORT}"
308332
networks:
309333
default:
310334
aliases:
@@ -341,13 +365,19 @@ services:
341365

342366
nginx-proxy:
343367
image: ${CONTAINER_REGISTRY}/jwilder/nginx-proxy
368+
environment:
369+
TZ: ${TZ}
344370
container_name: nginx-proxy
345371
# TODO: can we add an httpd health check and switch to wait for condition
346372
# service_healthy to avoid the storm of initial avoid nginx errors
347373
# from racing apache during start up? Apparently that will not work
348374
# with on-going jupyter integration due to swarm mode, however.
349375
depends_on:
350-
- migrid
376+
# IMPORTANT: daemons may require DNS to bind to domain ports
377+
devdns:
378+
condition: service_started
379+
migrid:
380+
condition: service_started
351381
ports:
352382
# NOTE: expose the unique raw port(s) to host
353383
- "80:80"

docker-compose_development_gdp.yml

+36-8
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ services:
144144
env_file:
145145
- migrid-httpd.env
146146
# IMPORTANT: please ONLY run with this test@ user for non-public hosts
147-
command: /app/docker-entry.sh -V -u ${MIG_TEST_USER} -p ${MIG_TEST_USER_PASSWORD} -s "sftp ftps webdavs"
147+
command: /app/docker-entry.sh -V -c -u ${MIG_TEST_USER} -p ${MIG_TEST_USER_PASSWORD} -s "sftp ftps webdavs"
148148
# NOTE: public hosts should create users through sign up and run like this
149149
#command: /app/docker-entry.sh -V
150150

@@ -160,7 +160,12 @@ services:
160160
# openid sftp sftpsubsys webdavs ftps notify imnotify vmproxy
161161
RUN_SERVICES: openid rsyslogd
162162
depends_on:
163-
- migrid
163+
# IMPORTANT: daemons may require DNS to bind to domain ports
164+
devdns:
165+
condition: service_started
166+
# IMPORTANT: finish volume init before launch as explained above
167+
migrid-volume-init:
168+
condition: service_completed_successfully
164169
ports:
165170
# NOTE: expose the unique raw port(s) to host
166171
- "${OPENID_PORT}:${OPENID_PORT}"
@@ -205,7 +210,12 @@ services:
205210
# openid sftp sftpsubsys webdavs ftps notify imnotify vmproxy
206211
RUN_SERVICES: sftp sftpsubsys rsyslogd
207212
depends_on:
208-
- migrid
213+
# IMPORTANT: daemons may require DNS to bind to domain ports
214+
devdns:
215+
condition: service_started
216+
# IMPORTANT: finish volume init before launch as explained above
217+
migrid-volume-init:
218+
condition: service_completed_successfully
209219
ports:
210220
# NOTE: expose the unique raw port(s) to host
211221
- "${SFTP_PORT}:${SFTP_PORT}"
@@ -255,11 +265,20 @@ services:
255265
# openid sftp sftpsubsys webdavs ftps notify imnotify vmproxy
256266
RUN_SERVICES: ftps rsyslogd
257267
depends_on:
258-
- migrid
268+
# IMPORTANT: daemons may require DNS to bind to domain ports
269+
devdns:
270+
condition: service_started
271+
# IMPORTANT: finish volume init before launch as explained above
272+
migrid-volume-init:
273+
condition: service_completed_successfully
259274
ports:
260-
# NOTE: expose the unique raw port(s) to host
275+
# NOTE: expose the unique raw port(s) to host
261276
- "${FTPS_CTRL_PORT}:${FTPS_CTRL_PORT}"
262-
- "${FTPS_PASSIVE_PORTS}:${FTPS_PASSIVE_PORTS}"
277+
# IMPORTANT: FTPS_PASV_PORTS is colon-separated but range needs hyphen
278+
# NOTE: compose does not support shell-style replacement so we can't use
279+
#- "${FTPS_PASV_PORTS/:/-}:${FTPS_PASV_PORTS/:/-}"
280+
# hard-code them for now.
281+
- "8100-8399"
263282
networks:
264283
default:
265284
aliases:
@@ -305,7 +324,12 @@ services:
305324
# openid sftp sftpsubsys webdavs ftps notify imnotify vmproxy
306325
RUN_SERVICES: webdavs rsyslogd
307326
depends_on:
308-
- migrid
327+
# IMPORTANT: daemons may require DNS to bind to domain ports
328+
devdns:
329+
condition: service_started
330+
# IMPORTANT: finish volume init before launch as explained above
331+
migrid-volume-init:
332+
condition: service_completed_successfully
309333
ports:
310334
# NOTE: expose the unique raw port(s) to host
311335
- "${DAVS_PORT}:${DAVS_PORT}"
@@ -353,7 +377,11 @@ services:
353377
# from racing apache during start up? Apparently that will not work
354378
# with on-going jupyter integration due to swarm mode, however.
355379
depends_on:
356-
- migrid
380+
# IMPORTANT: daemons may require DNS to bind to domain ports
381+
devdns:
382+
condition: service_started
383+
migrid:
384+
condition: service_started
357385
ports:
358386
# NOTE: expose the unique raw port(s) to host
359387
- "80:80"

0 commit comments

Comments
 (0)