Skip to content

Commit

Permalink
fix(docker): server wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
fiftin committed Oct 26, 2024
1 parent 75289ba commit 0ddf671
Show file tree
Hide file tree
Showing 2 changed files with 38,874 additions and 38,886 deletions.
16 changes: 2 additions & 14 deletions deployment/docker/server/server-wrapper
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,8 @@ file_env 'SEMAPHORE_ACCESS_KEY_ENCRYPTION'


#
# Extract database host and port from config.json if they are not set
#
if [ -f "${SEMAPHORE_CONFIG_PATH}/config.json" ]; then
if [ -z "${SEMAPHORE_DB_DIALECT}" ]; then
SEMAPHORE_DB_DIALECT=$(cat "${SEMAPHORE_CONFIG_PATH}/config.json" | jq '.dialect // ""' -r)
fi

if [ -z "${SEMAPHORE_DB_HOST}" ]; then
SEMAPHORE_DB_HOST=$(cat "${SEMAPHORE_CONFIG_PATH}/config.json" | jq ".${SEMAPHORE_DB_DIALECT}.host // \"\"" -r)
fi
fi

#
# Set default SEMAPHORE_DB_DIALECT and SEMAPHORE_DB_HOST if empty
# Extract database host and port from config.json if they are not set.
# Set default SEMAPHORE_DB_DIALECT and SEMAPHORE_DB_HOST if empty.
#
if [ -z "${SEMAPHORE_DB_DIALECT}" ]; then
if [ -f "${SEMAPHORE_CONFIG_PATH}/config.json" ]; then
Expand Down
Loading

0 comments on commit 0ddf671

Please sign in to comment.