add missing wait-for call
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2020-02-01 19:09:53 +01:00
parent 591857e2ba
commit 37b6df3996
2 changed files with 8 additions and 4 deletions

View File

@ -18,6 +18,8 @@ services:
ports: ports:
- "80:8080" - "80:8080"
environment: environment:
BITWARDENRS_WAIT_FOR_HOST: bitwardenrs_postgres
BITWARDENRS_WAIT_FOR_PORT: 5432
BITWARDENRS_DATABASE_URL: postgresql://user:pass@bitwardenrs_postgres:5432/bitwarden BITWARDENRS_DATABASE_URL: postgresql://user:pass@bitwardenrs_postgres:5432/bitwarden
BITWARDENRS_ADMIN_TOKEN: test BITWARDENRS_ADMIN_TOKEN: test

View File

@ -3,9 +3,11 @@ set -eo pipefail
/usr/local/bin/gomplate -V -o /app/.env -f /etc/templates/env.tmpl /usr/local/bin/gomplate -V -o /app/.env -f /etc/templates/env.tmpl
if [ -z "$BITWARDENRS_WAIT_FOR_HOST" ] && [ -z "$BITWARDENRS_WAIT_FOR_PORT" ] if [ ! -z "$BITWARDENRS_WAIT_FOR_HOST" ] && [ ! -z "$BITWARDENRS_WAIT_FOR_PORT" ]
then then
exec /app/bitwarden_rs printf "Wait for ${BITWARDENRS_WAIT_FOR_HOST}:${BITWARDENRS_WAIT_FOR_PORT} ...\n"
else /usr/local/bin/wait-for ${BITWARDENRS_WAIT_FOR_HOST}:${BITWARDENRS_WAIT_FOR_PORT}
exec ${BITWARDENRS_WAIT_FOR_HOST}:${BITWARDENRS_WAIT_FOR_PORT} -- /app/bitwarden_rs
fi fi
printf "Start Bitwarden Server ...\n"
exec /app/bitwarden_rs