feat: allow use of custom server.xml
parent
9ff2eb405e
commit
4a68744113
|
|
@ -122,8 +122,6 @@ RUN rm -rf /tmp/*
|
||||||
# Add default configs
|
# Add default configs
|
||||||
COPY config $CONFIG_DIR
|
COPY config $CONFIG_DIR
|
||||||
|
|
||||||
COPY config/server.xml $CATALINA_HOME/conf/server.xml
|
|
||||||
|
|
||||||
# Apply CIS Apache tomcat recommendations regarding server information
|
# Apply CIS Apache tomcat recommendations regarding server information
|
||||||
# * Alter the advertised server.info String (2.1 - 2.3)
|
# * Alter the advertised server.info String (2.1 - 2.3)
|
||||||
RUN cd $CATALINA_HOME/lib \
|
RUN cd $CATALINA_HOME/lib \
|
||||||
|
|
|
||||||
10
startup.sh
10
startup.sh
|
|
@ -111,6 +111,16 @@ if [ "${POSTGRES_JNDI_ENABLED}" = "true" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Use a custom "server.xml" if the user mounted one into the container
|
||||||
|
if [ -d "${CONFIG_OVERRIDES_DIR}" ] && [ -f "${CONFIG_OVERRIDES_DIR}/server.xml" ]; then
|
||||||
|
echo "Installing configuration override for server.xml with substituted environment variables"
|
||||||
|
envsubst < "${CONFIG_OVERRIDES_DIR}"/server.xml > "${CATALINA_HOME}/conf/server.xml"
|
||||||
|
else
|
||||||
|
# Otherwise use the default
|
||||||
|
echo "Installing default server.xml with substituted environment variables"
|
||||||
|
envsubst < "${CONFIG_DIR}"/server.xml > "${CATALINA_HOME}/conf/server.xml"
|
||||||
|
fi
|
||||||
|
|
||||||
# start the tomcat
|
# start the tomcat
|
||||||
# CIS - Tomcat Benchmark recommendations:
|
# CIS - Tomcat Benchmark recommendations:
|
||||||
# * Turn off session facade recycling
|
# * Turn off session facade recycling
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue