36 lines
909 B
YAML
36 lines
909 B
YAML
name: md-to-pdf
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: ..
|
|
dockerfile: deploy/Dockerfile
|
|
image: md-to-pdf:local
|
|
init: true
|
|
ports:
|
|
- "${MD_TO_PDF_PORT:-8080}:8080"
|
|
environment:
|
|
HOST: 127.0.0.1
|
|
PORT: 3001
|
|
PDF_RENDER_ORIGIN: http://127.0.0.1:8080
|
|
PDF_CONCURRENCY: "${PDF_CONCURRENCY:-1}"
|
|
PDF_MAX_QUEUE: "${PDF_MAX_QUEUE:-4}"
|
|
PDF_TIMEOUT_MS: "${PDF_TIMEOUT_MS:-120000}"
|
|
volumes:
|
|
- "${MD_TO_PDF_THEME_DIR:-../.local/themes}:/app/.local/themes:ro"
|
|
shm_size: "1gb"
|
|
security_opt:
|
|
- no-new-privileges:true
|
|
restart: unless-stopped
|
|
stop_grace_period: 30s
|
|
healthcheck:
|
|
test:
|
|
- CMD
|
|
- node
|
|
- -e
|
|
- fetch('http://127.0.0.1:8080/api/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))
|
|
interval: 10s
|
|
timeout: 3s
|
|
retries: 6
|
|
start_period: 30s
|