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