feat: support deep base URLs
This commit is contained in:
committed by
PlantUML
parent
6d90304fd7
commit
afd8bbcceb
18
docker-entrypoint.tomcat.sh
Executable file
18
docker-entrypoint.tomcat.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh
|
||||
# cspell:words mkdir
|
||||
# cspell:enableCompoundWords
|
||||
###########################################################
|
||||
|
||||
# choose war file name so that context path is correctly set based on BASE_URL,
|
||||
# following the rules from https://tomcat.apache.org/tomcat-9.0-doc/config/context.html#Naming,
|
||||
# specifically remove leading and trailing slashes and replace the remaining ones by hashes.
|
||||
export FILE_NAME="$(echo "$BASE_URL" | sed -e 's:^/::' -e 's:/$::' -e 's:/:#:g')"
|
||||
export FILE_PATH="$WEBAPP_PATH/$FILE_NAME.war"
|
||||
mv /plantuml.war "$FILE_PATH"
|
||||
|
||||
# base image entrypoint
|
||||
if [ -x /docker-entrypoint.sh ]; then
|
||||
/docker-entrypoint.sh "$@"
|
||||
else
|
||||
exec "$@"
|
||||
fi
|
||||
Reference in New Issue
Block a user