Using draw.io in self-hosted offline Wikijs #6282
-
I'm struggling to find an answer regarding whether this is possible. As a potential alternative solution, I was looking at using Kroki (which I have integrated) and the early support for diagrams.net (the same thing as draw.io). I believe the idea is that the XML code of a draw.io / diagrams.net file can be inserted into the wiki markdown using the kroki plugin but I haven't been able to get this working. My setup has Kroki working, I have pulled the diagrams_net docker image and have configured it in my yaml file. All other kroki drawing containers are working and able to embed images generated from the source code I put into the markdown. I have read yuzutech/kroki#405 and asked a few questions. I can embed a drawing as an image but need to have the drawing "encoded" into the Kroki format first, and my understanding was that the kroki plugin in Wikijs did all of this when using the correct markdown tagging. So has anyone got this working? If so, any pointers? Many thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Did you find the solution? |
Beta Was this translation helpful? Give feedback.
-
OK, here's the solution that I put in place that works for me. My Wiki is NOT running in a docker container, I decided to have it running on the actual OS. However, there are multiple modules which are docker-based, including Drawio which is documented below. Getting this to work for me in my environment actually requires a few steps for it to work seamlessly, especially if you have your Wiki instance running in SSL... Step 1 - Install/add the drawio to Docker
Restart docker and check that jgraph/drawio container is downloaded and starts OK. Check that it's listening on port 8080 (which we mapped in the docker-compose file previously) : note that I have several kroki plugins shown, you won't see these if you don't have them :)
In my instance, I have Nginx running as a reverse proxy up front which acts as the SSL termination. So I have Nginx listening on port 443 with a valid certificate which then proxies Wiki on port 3000. The reason we added drawio and have it listening on port 8080 is so that we can have a secondary nginx configuration which responds to a virtualhost name we will create against which there is another valid SSL certificate. This is then proxied onto port 8080. Step 2 - Create a new Nginx configuration file for the Drawio part
You will of course need a valid certificate and private key available in the locations mentioned in this config file. Step 3 - Modify Wiki.js source code to work with Drawio Open the file Step 4 - Wipe your browser's cache Note: If you're using SSL for your Wiki, you have to run drawio in SSL as well and all the certificates need to be valid to avoid strange errors. |
Beta Was this translation helpful? Give feedback.
-
Thanks to your hints I was able to create a docker-compose file which does the trick automatically
So you just have to replace |
Beta Was this translation helpful? Give feedback.
OK, here's the solution that I put in place that works for me. My Wiki is NOT running in a docker container, I decided to have it running on the actual OS. However, there are multiple modules which are docker-based, including Drawio which is documented below.
Getting this to work for me in my environment actually requires a few steps for it to work seamlessly, especially if you have your Wiki instance running in SSL...
Step 1 - Install/add the drawio to Docker
Open your docker-compose.yml file used to launch manage Wiki and add the "draw" section below:
Restart docker and check …