From e725d75cd9651726dd89e625ab09e8222de20ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Mon, 29 Jan 2024 09:50:18 +0100 Subject: [PATCH] Support custom web.xml --- startup.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/startup.sh b/startup.sh index 9195d26..8c3317c 100755 --- a/startup.sh +++ b/startup.sh @@ -109,6 +109,12 @@ if [ "${POSTGRES_JNDI_ENABLED}" = "true" ]; then echo "Installing default context.xml with substituted environment variables" envsubst < "${CONFIG_DIR}"/context.xml > "${CATALINA_HOME}/conf/context.xml" fi + + # Use a custom "web.xml" if the user mounted one into the container + if [ -d "${CONFIG_OVERRIDES_DIR}" ] && [ -f "${CONFIG_OVERRIDES_DIR}/web.xml" ]; then + echo "Installing configuration override for web.xml with substituted environment variables" + envsubst < "${CONFIG_OVERRIDES_DIR}"/web.xml > "$CATALINA_HOME/webapps/geoserver/WEB-INF/web.xml" + fi fi # start the tomcat