feat: add container library (#54)
Co-authored-by: Robert Kaussow <xoxys@rknet.org> Co-committed-by: Robert Kaussow <xoxys@rknet.org>
This commit is contained in:
parent
52d6ed530f
commit
3a91b11be2
@ -1,17 +1,20 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# shellcheck disable=SC3040
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
|
# shellcheck disable=SC1091
|
||||||
|
. /usr/local/lib/log.sh
|
||||||
|
|
||||||
/usr/local/bin/gomplate -o /app/.env -f /etc/templates/env.tmpl
|
/usr/local/bin/gomplate -o /app/.env -f /etc/templates/env.tmpl
|
||||||
|
|
||||||
if [ -n "$VAULTWARDEN_DATABASE_URL" ]
|
if [ -n "$VAULTWARDEN_DATABASE_URL" ]; then
|
||||||
then
|
|
||||||
WAITFOR_HOST=$(/usr/local/bin/url-parser host --url "$VAULTWARDEN_DATABASE_URL")
|
WAITFOR_HOST=$(/usr/local/bin/url-parser host --url "$VAULTWARDEN_DATABASE_URL")
|
||||||
WAITFOR_PORT=$(/usr/local/bin/url-parser port --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}"
|
log_info "Wait for database server on '${WAITFOR_HOST}:${WAITFOR_PORT:-5432}'"
|
||||||
/usr/local/bin/wait-for "${WAITFOR_HOST}":"${WAITFOR_PORT:-5432}"
|
/usr/local/bin/wait-for "${WAITFOR_HOST}":"${WAITFOR_PORT:-5432}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Start Vaultwarden Server ...\n"
|
log_info "Start Vaultwarden Server\n"
|
||||||
exec /app/vaultwarden
|
exec /app/vaultwarden
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
# shellcheck disable=SC3040
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
URL=http://127.0.0.1:8080/alive
|
URL=http://127.0.0.1:8080/alive
|
||||||
|
|
||||||
wget --quiet --tries=1 --spider ${URL}
|
! wget --quiet --tries=1 --spider ${URL} || exit 1
|
||||||
[ $? -ne 0 ] && exit 1
|
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user