Skip to content

Commit

Permalink
Merge pull request #262 from georchestra/startup-script
Browse files Browse the repository at this point in the history
  • Loading branch information
f-necas authored Nov 24, 2023
2 parents 5be6c4f + 13bb99e commit 4a4ed99
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions web/src/docker/docker-entrypoint.d/100-execute-custom-scripts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

# Executing custom scripts located in CUSTOM_SCRIPTS_DIRECTORY if environment variable is set
if [[ -z "${CUSTOM_SCRIPTS_DIRECTORY}" ]]; then
echo "[INFO] No CUSTOM_SCRIPTS_DIRECTORY env variable set"
else
echo "[INFO] CUSTOM_SCRIPTS_DIRECTORY env variable set to ${CUSTOM_SCRIPTS_DIRECTORY}"
# Regex is needed in jetty9 images, but not alpine's ones.
run-parts -v "${CUSTOM_SCRIPTS_DIRECTORY}" --regex='.*'
echo "[INFO] End executing custom scripts"
fi
2 changes: 1 addition & 1 deletion web/src/docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ DIR=/docker-entrypoint.d

if [[ -d "$DIR" ]]
then
/bin/run-parts --verbose "$DIR"
/bin/run-parts --verbose "$DIR" --regex='.*'
fi

exec "$@"

0 comments on commit 4a4ed99

Please sign in to comment.