Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ If you're running `Docker Toolbox` then start a web browser session to <http://1
* **COUNTRY_CODE**: Country code to be used as certificate "C" record; default `FR`
* **KEYSTORE_PASS**: ".keystore"/.jks" store password; default `V3ry1nS3cur3P4ssw0rd`
* **KEY_PASS**: Private key password; default `<ref:KEYSTORE_PASS>`
* **TOMCAT_REQUEST_HEADER_LIMIT**: Request header limit for the Tomcat Server

## HTTPS SSL Certificate via Let's Encrypt

Expand Down
9 changes: 9 additions & 0 deletions main/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ if [ -n "$DRAWIO_SERVER_URL" ] && [ "$CONTEXT_PATH" != "/" ]; then
else
echo "Tomcat context remains at root '/'"
fi

# Update the maxHTTPHeaderSize in Tomcat for the HTTP endpoint
echo "Updating Tomcat max header size to '${TOMCAT_REQUEST_HEADER_LIMIT:-8192}'"
xmlstarlet ed -P -S -L \
-i '/Server/Service/Connector[@port="8080"]' -t attr -n 'maxHttpHeaderSize' -v "${TOMCAT_REQUEST_HEADER_LIMIT:-8192}" \
conf/server.xml


#DRAWIO_VIEWER_URL is path to the viewer js, e.g. https://www.example.com/js/viewer.min.js
echo "window.DRAWIO_VIEWER_URL = '${DRAWIO_VIEWER_URL}';" >> $CATALINA_HOME/webapps/draw/js/PreConfig.js
#DRAWIO_LIGHTBOX_URL Replace with your lightbox URL, eg. https://www.example.com
Expand Down Expand Up @@ -189,6 +197,7 @@ if [ -f $CATALINA_HOME/.keystore ] && [ -z $VAR ]; then
-i "/Server/Service/${UUID}" -t 'attr' -n 'KeystoreFile' -v "$CATALINA_HOME/.keystore" \
-i "/Server/Service/${UUID}" -t 'attr' -n 'KeystorePass' -v "${KEY_PASS}" \
-i "/Server/Service/${UUID}" -t 'attr' -n 'defaultSSLHostConfigName' -v "${PUBLIC_DNS:-'draw.example.com'}" \
-i "/Server/Service/${UUID}" -t 'attr' -n 'maxHttpHeaderSize' -v "${TOMCAT_REQUEST_HEADER_LIMIT:-8192}" \
-s "/Server/Service/${UUID}" -t 'elem' -n 'SSLHostConfig' \
-i "/Server/Service/${UUID}/SSLHostConfig" -t 'attr' -n 'hostName' -v "${PUBLIC_DNS:-'draw.example.com'}" \
-i "/Server/Service/${UUID}/SSLHostConfig" -t 'attr' -n 'protocols' -v 'TLSv1.2' \
Expand Down