From 052ef25f44fb3bd77bfeb32fe9b4a2dfdcbc9ae7 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Tue, 4 Feb 2020 13:17:04 +0100 Subject: [PATCH] add delay to minimize connection errors on first start --- docker-compose.yml | 6 +++++- overlay/usr/local/bin/entrypoint | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5e54264..43dc61c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,6 +29,7 @@ services: bitwardenrs_ldap: container_name: bitwardenrs_ldap_sync + restart: always image: xoxys/bitwardenrs_ldap:latest depends_on: - bitwardenrs @@ -37,7 +38,10 @@ services: BITWARDENRS_LDAP_BITWARDEN_URL: http://bitwardenrs_server:8080 BITWARDENRS_LDAP_BITWARDEN_ADMIN_TOKEN: my_secure_token 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: data: diff --git a/overlay/usr/local/bin/entrypoint b/overlay/usr/local/bin/entrypoint index 2c7e3f8..d77a09e 100755 --- a/overlay/usr/local/bin/entrypoint +++ b/overlay/usr/local/bin/entrypoint @@ -36,6 +36,9 @@ then 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}" + + # TODO: add delay to minimize connection errors + sleep 10 fi exec env CONFIG_PATH=/app/config.toml /app/bitwarden_rs_ldap