vaultwarden/overlay/usr/local/bin/entrypoint
Robert Kaussow 11a9ca4f91
All checks were successful
continuous-integration/drone/push Build is passing
chore: remove gomplate debug output
2020-12-31 13:22:05 +01:00

18 lines
540 B
Bash
Executable File

#!/usr/bin/env sh
set -eo pipefail
/usr/local/bin/gomplate -o /app/.env -f /etc/templates/env.tmpl
if [ -n "$BITWARDENRS_DATABASE_URL" ]
then
WAITFOR_HOST=$(/usr/local/bin/url-parser host --url "$BITWARDENRS_DATABASE_URL")
WAITFOR_PORT=$(/usr/local/bin/url-parser port --url "$BITWARDENRS_DATABASE_URL")
printf "Wait for database server on '%s:%s' ...\n" "${WAITFOR_HOST}" "${WAITFOR_PORT:-5432}"
/usr/local/bin/wait-for "${WAITFOR_HOST}":"${WAITFOR_PORT:-5432}"
fi
printf "Start Bitwarden Server ...\n"
exec /app/bitwarden_rs