add delay to minimize connection errors on first start
Some checks failed
continuous-integration/drone/push Build is passing
continuous-integration/drone/tag Build is failing

This commit is contained in:
Robert Kaussow 2020-02-04 13:17:04 +01:00
parent 3deeba1251
commit 052ef25f44
2 changed files with 8 additions and 1 deletions

View File

@ -29,6 +29,7 @@ services:
bitwardenrs_ldap: bitwardenrs_ldap:
container_name: bitwardenrs_ldap_sync container_name: bitwardenrs_ldap_sync
restart: always
image: xoxys/bitwardenrs_ldap:latest image: xoxys/bitwardenrs_ldap:latest
depends_on: depends_on:
- bitwardenrs - bitwardenrs
@ -37,7 +38,10 @@ services:
BITWARDENRS_LDAP_BITWARDEN_URL: http://bitwardenrs_server:8080 BITWARDENRS_LDAP_BITWARDEN_URL: http://bitwardenrs_server:8080
BITWARDENRS_LDAP_BITWARDEN_ADMIN_TOKEN: my_secure_token BITWARDENRS_LDAP_BITWARDEN_ADMIN_TOKEN: my_secure_token
BITWARDENRS_LDAP_HOST: bitwardenrs_ldap BITWARDENRS_LDAP_HOST: bitwardenrs_ldap
BITWARDENRS_LDAP_PORT: 389 BITWARDENRS_LDAP_SSL: "False"
BITWARDENRS_LDAP_BIND_DN: "cn=admin,dc=example,dc=org"
BITWARDENRS_LDAP_SEARCH_BASE_DN: "dc=example,dc=org"
BITWARDENRS_LDAP_BIND_PASSWORD: admin
volumes: volumes:
data: data:

View File

@ -36,6 +36,9 @@ then
printf "Wait for ldap server on '%s:%s'...\n" "${BITWARDENRS_LDAP_HOST}" "${BITWARDENRS_LDAP_PORT}" printf "Wait for ldap server on '%s:%s'...\n" "${BITWARDENRS_LDAP_HOST}" "${BITWARDENRS_LDAP_PORT}"
/usr/local/bin/wait-for "${BITWARDENRS_LDAP_HOST}":"${BITWARDENRS_LDAP_PORT}" /usr/local/bin/wait-for "${BITWARDENRS_LDAP_HOST}":"${BITWARDENRS_LDAP_PORT}"
# TODO: add delay to minimize connection errors
sleep 10
fi fi
exec env CONFIG_PATH=/app/config.toml /app/bitwarden_rs_ldap exec env CONFIG_PATH=/app/config.toml /app/bitwarden_rs_ldap