-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: implement custom scripts for mapstore
- Loading branch information
Showing
4 changed files
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,3 +15,5 @@ coverage/ | |
backend/.classpath | ||
backend/.project | ||
package-lock.json | ||
.idea/ | ||
docker/*.war |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
georchestra-docker-scripts/docker-entrypoint.d/100-execute-custom-scripts.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
DIR=/docker-entrypoint.d | ||
|
||
if [[ -d "$DIR" ]] | ||
then | ||
# Regex is needed to execute all kind of files, including sh files. Warning : --regex not available in alpine images. | ||
/bin/run-parts --verbose "$DIR" --regex='.*' | ||
fi | ||
|
||
exec "$@" |