Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
CONTAINER=drawio
IMAGE=jgraph/drawio

docker stop $CONTAINER
docker rm $CONTAINER
DIR=`pwd -P`

docker run --name $CONTAINER \
-e DRAWIO_SERVER_URL=https://drawio.jmehan.com/ \
-e DRAWIO_BASE_URL=https://drawio.jmehan.com \
-e DRAWIO_GOOGLE_APP_ID=<GOOGLE_APP_ID> \
-e DRAWIO_GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> \
-e DRAWIO_GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> \
--restart=always \
-p 9080:8080 -p 9443:8443 \
-d $IMAGE

docker logs -f $CONTAINER

Google Drive

You will need to create a project at Google API Console and create Credentials of type "Create OAuth client ID" -> Web Application. This option will be disabled until you create "OAuth consent screen" from the link in warning message bar. In the "OAuth consent screen" configuration, enter the "Application name" and "Authorized domains". In the "Create OAuth client ID" configuration, enter the required information and note that "Authorized redirect URIs" is [your-draw.io-hostname]/google. For example, if you host draw.io at https://drawio.example.com, then "Authorized redirect URIs" whould be https://drawio.example.com/google and "Authorized JavaScript origins" would be https://drawio.example.com.

...

Set the values of the generated "Client ID" and "Client secret" into environment variables DRAWIO_GOOGLE_VIEWER_CLIENT_IDand DRAWIO_GOOGLE_VIEWER_CLIENT_SECRET. Also, set DRAWIO_GOOGLE_VIEWER_APP_ID environment variable to your Google App ID.



References