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

Implement custom-scripts to geonetwork #262

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
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 "$@"
Loading