Robert Kaussow
8e9cf353f4
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Robert Kaussow <mail@geeklabor.de> Reviewed-on: docker/vaultwarden#41 Co-authored-by: Robert Kaussow <xoxys@rknet.org> Co-committed-by: Robert Kaussow <xoxys@rknet.org>
18 lines
541 B
Bash
Executable File
18 lines
541 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 "$VAULTWARDEN_DATABASE_URL" ]
|
|
then
|
|
WAITFOR_HOST=$(/usr/local/bin/url-parser host --url "$VAULTWARDEN_DATABASE_URL")
|
|
WAITFOR_PORT=$(/usr/local/bin/url-parser port --url "$VAULTWARDEN_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 Vaultwarden Server ...\n"
|
|
exec /app/vaultwarden
|