diff --git a/Dockerfile b/Dockerfile index 62e8209..c3321f7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,4 +35,5 @@ RUN mkdir -p ${CONFLUENCE_INSTALL_DIR} \ && curl -L --silent ${DOWNLOAD_URL} | tar -xz --strip-components=1 -C "$CONFLUENCE_INSTALL_DIR" \ && chown -R ${RUN_USER}:${RUN_GROUP} ${CONFLUENCE_INSTALL_DIR}/ \ && sed -i -e 's/-Xms\([0-9]\+[kmg]\) -Xmx\([0-9]\+[kmg]\)/-Xms\${JVM_MINIMUM_MEMORY:=\1} -Xmx\${JVM_MAXIMUM_MEMORY:=\2} \${JVM_SUPPORT_RECOMMENDED_ARGS} -Dconfluence.home=\${CONFLUENCE_HOME}/g' ${CONFLUENCE_INSTALL_DIR}/bin/setenv.sh \ - && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml \ No newline at end of file + && sed -i -e 's/port="8090"/port="8090" secure="${catalinaConnectorSecure}" scheme="${catalinaConnectorScheme}" proxyName="${catalinaConnectorProxyName}" proxyPort="${catalinaConnectorProxyPort}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml \ + && sed -i -e 's/Context path=""/Context path="${catalinaContextPath}"/' ${CONFLUENCE_INSTALL_DIR}/conf/server.xml diff --git a/README.md b/README.md index 9557a8c..969c54c 100644 --- a/README.md +++ b/README.md @@ -60,6 +60,10 @@ If Confluence is run behind a reverse proxy server, then you need to specify ext * `CATALINA_CONNECTOR_SECURE` (default: false) Set 'true' if CATALINA_CONNECTOR_SCHEME is 'https'. + +* `CATALINA_CONTEXT_PATH` (default: NONE) + + The context path the application is served over. ## JVM configuration diff --git a/entrypoint.sh b/entrypoint.sh index d9f474b..9f0105f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -6,6 +6,7 @@ set -euo pipefail : ${CATALINA_CONNECTOR_PROXYPORT:=} : ${CATALINA_CONNECTOR_SCHEME:=http} : ${CATALINA_CONNECTOR_SECURE:=false} +: ${CATALINA_CONTEXT_PATH:=} : ${CATALINA_OPTS:=} @@ -13,6 +14,7 @@ CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyName=${CATALINA_CONNECTO CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorProxyPort=${CATALINA_CONNECTOR_PROXYPORT}" CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorScheme=${CATALINA_CONNECTOR_SCHEME}" CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaConnectorSecure=${CATALINA_CONNECTOR_SECURE}" +CATALINA_OPTS="${CATALINA_OPTS} -DcatalinaContextPath=${CATALINA_CONTEXT_PATH}" export CATALINA_OPTS