git clone https://github.com/jihchi/mermaid.ink.git
cd mermaid.ink
pnpm install
DEBUG=app:* pnpm start
Go to http://localhost:3000
See here for supported tags.
docker run --cap-add=SYS_ADMIN ghcr.io/jihchi/mermaid.ink
Go to http://localhost:3000
If you don't / can't add --cap-add=SYS_ADMIN
to the command, please refer to 3 ways to securely use Chrome Headless with this image to find the most suitable solution for your case.
For example, you can use Jessie Frazelle seccomp profile for Chrome:
wget https://raw.githubusercontent.com/jfrazelle/dotfiles/master/etc/docker/seccomp/chrome.json
docker run --security-opt seccomp=$(pwd)/chrome.json ghcr.io/jihchi/mermaid.ink
Note that you may encounter DoS if you increase --max-http-header-size
!
-
If running locally, add
--max-http-header-size
to the start script in package.json- e.g.
"start": "node --max-http-header-size=102400000 src/index.js"
- e.g.
-
If running via docker, use
NODE_OPTIONS
to increase--max-http-header-size
- e.g.
docker run --rm -it -e 'NODE_OPTIONS="--max-http-header-size=102400000"' -p 3000:3000 jihchi/mermaid.ink
- e.g.
Or, If running locally, run NODE_OPTIONS="--max-http-header-size=102400000" npm start
to increase --max-http-header-size
Many thanks for your help!
The image of contributors is made with contrib.rocks.