The entrypoint script writes out DRAWIO_MSGRAPH_TENANT_ID to PreConfig.js, but not msgraph_tenant_id.
|
if [[ -z "${DRAWIO_MSGRAPH_CLIENT_ID}" ]]; then |
|
echo "urlParams['od'] = '0'; //OneDrive" >> $CATALINA_HOME/webapps/draw/js/PreConfig.js |
|
else |
|
#Google drive application id and client id for the editor |
|
echo "window.DRAWIO_MSGRAPH_CLIENT_ID = '${DRAWIO_MSGRAPH_CLIENT_ID}'; " >> $CATALINA_HOME/webapps/draw/js/PreConfig.js |
|
echo -n "${DRAWIO_MSGRAPH_CLIENT_ID}" > $CATALINA_HOME/webapps/draw/WEB-INF/msgraph_client_id |
|
echo -n "${DRAWIO_MSGRAPH_CLIENT_SECRET}" > $CATALINA_HOME/webapps/draw/WEB-INF/msgraph_client_secret |
|
|
|
if [[ "${DRAWIO_MSGRAPH_TENANT_ID}" ]]; then |
|
echo "window.DRAWIO_MSGRAPH_TENANT_ID = '${DRAWIO_MSGRAPH_TENANT_ID}'; " >> $CATALINA_HOME/webapps/draw/js/PreConfig.js |
|
fi |
|
fi |
The server app is expecting to read the tenant id from this file here:
https://github.com/jgraph/drawio/blob/890ea0b7880f4962bfc2b25b35103286aad0d1cb/src/main/java/com/mxgraph/online/MSGraphAuth.java#L13
I can work around this by writing the tenant id out to a file and bind mounting it:
- type: bind
source: ./msgraph_tenant_id
target: /usr/local/tomcat/webapps/draw/WEB-INF/msgraph_tenant_id
read_only: true
Also bonus meme: comments in this section reference google drive.
The entrypoint script writes out
DRAWIO_MSGRAPH_TENANT_IDtoPreConfig.js, but notmsgraph_tenant_id.docker-drawio/main/docker-entrypoint.sh
Lines 100 to 111 in bcda4f2
The server app is expecting to read the tenant id from this file here:
https://github.com/jgraph/drawio/blob/890ea0b7880f4962bfc2b25b35103286aad0d1cb/src/main/java/com/mxgraph/online/MSGraphAuth.java#L13
I can work around this by writing the tenant id out to a file and bind mounting it:
Also bonus meme: comments in this section reference google drive.