Merge pull request #5952 from Piratenpartei/server_setup_env

Add ENV for server-setup host and port
This commit is contained in:
Finn Stutzenstein 2021-04-12 08:04:58 +02:00 committed by GitHub
commit 2b3d1db3bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 2 deletions

View File

@ -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=

View File

@ -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

View File

@ -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' "$*"