open-design/deploy/docker-compose.yml
2026-05-29 16:22:41 +08:00

45 lines
1.2 KiB
YAML

name: open-design
services:
open-design:
container_name: open-design
image: ${OPEN_DESIGN_IMAGE:-docker.io/vanjayak/open-design:latest}
build:
context: ..
dockerfile: deploy/Dockerfile
restart: always
environment:
NODE_ENV: production
NODE_OPTIONS: ${NODE_OPTIONS:---max-old-space-size=192}
OD_BIND_HOST: 0.0.0.0
OD_ALLOWED_ORIGINS: ${OPEN_DESIGN_ALLOWED_ORIGINS:-}
OD_PORT: 7456
OD_WEB_PORT: ${OPEN_DESIGN_PORT:-7456}
OD_API_TOKEN: ${OD_API_TOKEN:?Please run 'openssl rand -hex 32' to generate one, and set it in your .env file.}
OD_CODEX_SANDBOX: ${OD_CODEX_SANDBOX:-}
ports:
- "127.0.0.1:${OPEN_DESIGN_PORT:-7456}:7456"
volumes:
- open_design_data:/app/.od
read_only: true
tmpfs:
- /tmp
security_opt:
- no-new-privileges:true
mem_limit: ${OPEN_DESIGN_MEM_LIMIT:-384m}
pids_limit: 256
healthcheck:
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:7456/api/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
]
interval: 30s
timeout: 5s
retries: 3
start_period: 20s
volumes:
open_design_data: