vaultwarden/overlay/usr/local/bin/entrypoint
Robert Kaussow 8dcacf02e2
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is passing
fix url-parser syntax
2023-09-06 23:31:10 +02:00

21 lines
607 B
Bash
Executable File

#!/usr/bin/env sh
# shellcheck disable=SC3040
set -eo pipefail
# shellcheck disable=SC1091
. /usr/local/lib/log.sh
/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 --url "$VAULTWARDEN_DATABASE_URL" host)
WAITFOR_PORT=$(/usr/local/bin/url-parser --url "$VAULTWARDEN_DATABASE_URL" port)
log_info "Wait for database server on '${WAITFOR_HOST}:${WAITFOR_PORT:-5432}'"
/usr/local/bin/wait-for "${WAITFOR_HOST}":"${WAITFOR_PORT:-5432}"
fi
log_info "Start Vaultwarden Server\n"
exec /app/vaultwarden