42 lines
1.3 KiB
YAML
42 lines
1.3 KiB
YAML
name: md-to-pdf
|
|
|
|
services:
|
|
app:
|
|
build:
|
|
context: ..
|
|
dockerfile: deploy/Dockerfile
|
|
args:
|
|
RUNTIME_BASE_IMAGE: ${MD_TO_PDF_RUNTIME_BASE_IMAGE:-node:22-bookworm-slim}
|
|
REUSE_PLAYWRIGHT_RUNTIME: ${MD_TO_PDF_REUSE_PLAYWRIGHT_RUNTIME:-0}
|
|
image: "${MD_TO_PDF_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}"
|
|
APP_VERSION: "${MD_TO_PDF_APP_VERSION:-0.6.0}"
|
|
FONT_PACK_ROOT: /app/.local/font-packs
|
|
volumes:
|
|
- "${MD_TO_PDF_THEME_DIR:-../.local/themes}:/app/.local/themes:ro"
|
|
- "${MD_TO_PDF_FONT_PACK_DIR:-../.local/font-packs}:/app/.local/font-packs: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
|