fix wait-for conditions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9aa5146488
commit
3390ad995b
@ -31,6 +31,6 @@ USER app
|
|||||||
|
|
||||||
STOPSIGNAL SIGTERM
|
STOPSIGNAL SIGTERM
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
ENTRYPOINT ["/usr/local/bin/entrypoint"]
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
CMD []
|
CMD []
|
||||||
|
@ -12,23 +12,24 @@ fi
|
|||||||
|
|
||||||
if [ -n "$BITWARDENRS_LDAP_BITWARDEN_URL" ]
|
if [ -n "$BITWARDENRS_LDAP_BITWARDEN_URL" ]
|
||||||
then
|
then
|
||||||
WAITFOR_DB_SCHEME=$(/usr/local/bin/url-parser scheme --url "$BITWARDENRS_LDAP_BITWARDEN_URL")
|
WAITFOR_BW_SCHEME=$(/usr/local/bin/url-parser scheme --url "$BITWARDENRS_LDAP_BITWARDEN_URL")
|
||||||
WAITFOR_DB_HOST=$(/usr/local/bin/url-parser host --url "$BITWARDENRS_LDAP_BITWARDEN_URL")
|
WAITFOR_BW_HOST=$(/usr/local/bin/url-parser host --url "$BITWARDENRS_LDAP_BITWARDEN_URL")
|
||||||
WAITFOR_DB_PORT=$(/usr/local/bin/url-parser port --url "$BITWARDENRS_LDAP_BITWARDEN_URL")
|
WAITFOR_BW_PORT=$(/usr/local/bin/url-parser port --url "$BITWARDENRS_LDAP_BITWARDEN_URL")
|
||||||
|
|
||||||
if [ -n "$WAITFOR_DB_PORT" ]
|
if [ -z "$WAITFOR_BW_PORT" ]
|
||||||
then
|
then
|
||||||
[ "$WAITFOR_DB_SCHEME" = "https" ] && WAITFOR_DB_PORT=433 || WAITFOR_DB_PORT=80
|
[ "$WAITFOR_BW_SCHEME" = "https" ] && WAITFOR_BW_PORT=433 || WAITFOR_BW_PORT=80
|
||||||
fi
|
fi
|
||||||
|
|
||||||
printf "Wait for bitwarden server on '%s:%s'...\n" "${WAITFOR_DB_HOST}" "${WAITFOR_DB_PORT}"
|
printf "Wait for bitwarden server on '%s:%s'...\n" "${WAITFOR_BW_HOST}" "${WAITFOR_BW_PORT}"
|
||||||
/usr/local/bin/wait-for "${WAITFOR_DB_HOST}":"${WAITFOR_DB_PORT}"
|
/usr/local/bin/wait-for "${WAITFOR_BW_HOST}":"${WAITFOR_BW_PORT}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -n "$BITWARDENRS_LDAP_HOST" ]
|
if [ -n "$BITWARDENRS_LDAP_HOST" ]
|
||||||
then
|
then
|
||||||
WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "BITWARDENRS_LDAP_SSL" "true" | conv.Bool }}')
|
WAITFOR_LDAP_SSL=$(/usr/local/bin/gomplate -i '{{ getenv "BITWARDENRS_LDAP_SSL" "true" | conv.Bool }}')
|
||||||
if [ -n "$WAITFOR_LDAP_PORT" ]
|
|
||||||
|
if [ -z "$WAITFOR_LDAP_PORT" ]
|
||||||
then
|
then
|
||||||
[ "$WAITFOR_LDAP_SSL" = true ] && WAITFOR_LDAP_PORT=636 || WAITFOR_LDAP_PORT=389
|
[ "$WAITFOR_LDAP_SSL" = true ] && WAITFOR_LDAP_PORT=636 || WAITFOR_LDAP_PORT=389
|
||||||
fi
|
fi
|
Reference in New Issue
Block a user