improve docker handling

This commit is contained in:
Florian
2021-10-11 17:33:30 +02:00
committed by arnaudroques
parent 5190a72cc8
commit 221af78afc
6 changed files with 73 additions and 82 deletions

17
docker-entrypoint.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
# cspell:words mkdir
# cspell:enableCompoundWords
###########################################################
# use environment variables
if [ "$BASE_URL" != "ROOT" ]; then
mkdir -p "$(dirname "$WEBAPP_PATH/$BASE_URL")"
mv "$WEBAPP_PATH/ROOT.war" "$WEBAPP_PATH/$BASE_URL.war"
fi
# base image entrypoint
if [ -x /docker-entrypoint.sh ]; then
/docker-entrypoint.sh "$@"
else
exec "$@"
fi