Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Docker server-wrapper - to fit to documentation #2384

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions deployment/docker/server/server-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ file_env 'SEMAPHORE_ADMIN' 'admin'
export SEMAPHORE_ADMIN_EMAIL="${SEMAPHORE_ADMIN_EMAIL:-admin@localhost}"
export SEMAPHORE_ADMIN_NAME="${SEMAPHORE_ADMIN_NAME:-Semaphore Admin}"
file_env 'SEMAPHORE_ADMIN_PASSWORD' 'semaphorepassword'
# In the documentation the ENV is 'SEMAPHORE_LDAP_ENABLE' therefore we allow both to set
[ -z "$SEMAPHORE_LDAP_ACTIVATED" ] && [ -n "$SEMAPHORE_LDAP_ENABLE" ] && SEMAPHORE_LDAP_ACTIVATED="${SEMAPHORE_LDAP_ENABLE}"
export SEMAPHORE_LDAP_ACTIVATED="${SEMAPHORE_LDAP_ACTIVATED:-no}"
# In the documentation the ENV is 'SEMAPHORE_LDAP_SERVER' therefore we allow both to set
[ -z "$SEMAPHORE_LDAP_HOST" ] && [ -n "$SEMAPHORE_LDAP_SERVER" ] && export SEMAPHORE_LDAP_HOST="${SEMAPHORE_LDAP_SERVER}"
export SEMAPHORE_LDAP_HOST="${SEMAPHORE_LDAP_HOST:-}"
export SEMAPHORE_LDAP_PORT="${SEMAPHORE_LDAP_PORT:-}"
export SEMAPHORE_LDAP_PORT="${SEMAPHORE_LDAP_PORT}"
# If LDAP port is not empty add it to 'SEMAPHORE_LDAP_HOST', but if empty use 'SEMAPHORE_LDAP_HOST' alone (for SEMAPHORE_LDAP_HOST='host:389')
[ -n "$SEMAPHORE_LDAP_PORT" ] && export SEMAPHORE_LDAP_HOST="${SEMAPHORE_LDAP_HOST}:${SEMAPHORE_LDAP_PORT}"
export SEMAPHORE_LDAP_DN_BIND="${SEMAPHORE_LDAP_DN_BIND:-}"
file_env 'SEMAPHORE_LDAP_PASSWORD'
export SEMAPHORE_LDAP_DN_SEARCH="${SEMAPHORE_LDAP_DN_SEARCH:-}"
Expand Down Expand Up @@ -151,7 +157,7 @@ EOF

if [ "${SEMAPHORE_LDAP_ACTIVATED}" = "yes" ]; then
cat << EOF >> "${SEMAPHORE_TMP_PATH}/config.stdin"
${SEMAPHORE_LDAP_HOST}:${SEMAPHORE_LDAP_PORT}
${SEMAPHORE_LDAP_HOST}
${SEMAPHORE_LDAP_NEEDTLS:-no}
${SEMAPHORE_LDAP_DN_BIND}
${SEMAPHORE_LDAP_PASSWORD}
Expand Down