Skip to content

Commit

Permalink
Make docker compose create completely sequential to avoid any races t…
Browse files Browse the repository at this point in the history
…here.

Make development SMTP listen port configurable to cater for systems running a local SMTP on the default port.
  • Loading branch information
jonasbardino committed Mar 26, 2024
1 parent 3c10a67 commit 12e881c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ initcomposevars:
@sed -E -i 's!^([^=]*)=.*! - \1=\$$\{\1\}!' docker-compose_shared.yml

up: initcomposevars
# IMPORTANT: split up into create and start to avoid racy overlap
# parallel container creation and start breaks nested bind mounts
${DOCKER_COMPOSE} create
# IMPORTANT: split up into sequential create and start to avoid racy overlap.
# Concurrent container creation and start breaks nested mounts.
${DOCKER_COMPOSE} --parallel=1 create
${DOCKER_COMPOSE} up -d

down: initcomposevars
Expand Down
1 change: 1 addition & 0 deletions development.env
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ADMIN_EMAIL="MiG Info <mig@migrid.test>"
ADMIN_LIST=
SMTP_SENDER=
SMTP_SERVER=mail.migrid.test
SMTP_LISTEN_PORT=25
LOG_LEVEL=info
TITLE="Minimum intrusion Grid"
SHORT_TITLE=MiG
Expand Down
5 changes: 3 additions & 2 deletions development_gdp.env
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ADMIN_EMAIL="GDP Info <mig@gdp.test>"
ADMIN_LIST=
SMTP_SENDER=
SMTP_SERVER=mail.gdp.test
SMTP_LISTEN_PORT=25
LOG_LEVEL=info
TITLE="General Data Protection"
SHORT_TITLE=GDP
Expand Down Expand Up @@ -175,11 +176,11 @@ TZ=Europe/Copenhagen

# The URL of the of designated jupyter services
# The url is prefixed by the name of the service itself
JUPYTER_SERVICES="dag.http://dag.test"
JUPYTER_SERVICES="DAG.https://dag.test"

# The description associated with each jupyter service
# The key is the name of the service it describes
JUPYTER_SERVICES_DESC="{'dag': '/home/mig/state/wwwpublic/dag_desc.html'}"
JUPYTER_SERVICES_DESC="{'DAG': '/home/mig/state/wwwpublic/dag_desc.html'}"

# User that is created inside migrid for testing purposes
# Must be explicitly used in docker-compose.yml
Expand Down
2 changes: 1 addition & 1 deletion docker-compose_development.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
depends_on:
- devdns
ports:
- "127.0.0.1:25:25"
- "127.0.0.1:${SMTP_LISTEN_PORT}:25"
environment:
POSTFIX_myhostname: ${SMTP_SERVER}
networks:
Expand Down

0 comments on commit 12e881c

Please sign in to comment.