From 52108cd0c445dea70b0aee3af40ea546c3405286 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrian=20N=C3=B6thlich?= Date: Fri, 12 Mar 2021 01:07:39 +0100 Subject: [PATCH] Add ENV for server-setup host and port MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Adrian Nöthlich --- docker/.env | 2 ++ docker/docker-compose.yml.m4 | 2 ++ server/docker/entrypoint | 3 +-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docker/.env b/docker/.env index 9f7713257..1719cf798 100644 --- a/docker/.env +++ b/docker/.env @@ -89,6 +89,8 @@ REDIS_PORT= REDIS_SLAVE_HOST= REDIS_SLAVE_PORT= REDIS_SLAVE_WAIT_TIMEOUT= +SERVER_SETUP_HOST= +SERVER_SETUP_PORT= # Logging DJANGO_LOG_LEVEL= diff --git a/docker/docker-compose.yml.m4 b/docker/docker-compose.yml.m4 index 023989d60..9e5d10680 100644 --- a/docker/docker-compose.yml.m4 +++ b/docker/docker-compose.yml.m4 @@ -82,6 +82,8 @@ x-osserver-env: &default-osserver-env REDIS_PORT: ifenvelse(`REDIS_PORT', 6379) REDIS_SLAVE_HOST: "ifenvelse(`REDIS_SLAVE_HOST', redis-slave)" REDIS_SLAVE_PORT: ifenvelse(`REDIS_SLAVE_PORT', 6379) + SERVER_SETUP_HOST: "ifenvelse(`SERVER_SETUP_HOST', server-setup)" + SERVER_SETUP_PORT: ifenvelse(`SERVER_SETUP_PORT', 8000) RESET_PASSWORD_VERBOSE_ERRORS: "ifenvelse(`RESET_PASSWORD_VERBOSE_ERRORS', False)" x-pgnode: &default-pgnode image: ifenvelse(`DEFAULT_DOCKER_REGISTRY', openslides)/openslides-repmgr:latest diff --git a/server/docker/entrypoint b/server/docker/entrypoint index 2932f2bf4..40b5eec16 100755 --- a/server/docker/entrypoint +++ b/server/docker/entrypoint @@ -14,8 +14,7 @@ export SECRET_KEY="$DJANGO_SECRET_KEY" # SAML setup . /usr/local/lib/saml-setup.sh -# TODO: env variable for this host -wait-for-it -t 0 "server-setup:8000" +wait-for-it -t 0 "${SERVER_SETUP_HOST:-server-setup}:${SERVER_SETUP_PORT:-8000}" printf 'Executing server: "%s"\n' "$*"