Self-hosted diagrams.net for architecture sketches.
Educational example only. Review every volume path, port, and credential before you run this. Do not copy production secrets into your wiki or git repo.
_shared/.env for non-secrets, _shared/.secret for credentialsmkdir -p /path/to/docker/stacks/drawio
cd /path/to/docker/stacks/drawio
# paste compose.yaml below, then:
docker compose pull
docker compose up -d
---
services:
drawio:
image: jgraph/drawio
container_name: drawio
hostname: drawio
env_file:
- /path/to/docker/stacks/_shared/.env
- /path/to/docker/stacks/_shared/.secret
# PUBLIC_DNS comes from _shared/.env via env_file
logging:
driver: json-file
options:
max-file: ${DOCKERLOGGING_MAXFILE:-10} # Max number of log files
max-size: ${DOCKERLOGGING_MAXSIZE:-200k} # Max file size
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080 || exit 1"]
interval: 5s
timeout: 5s
retries: 5
start_period: 10s
ports:
- 30009:8080
#- 9443:8443
restart: unless-stopped
_shared/.secret.