mirror of
https://github.com/nexu-io/open-design.git
synced 2026-05-31 19:04:39 +07:00
* fix(docker): fix container startup crash due to missing OD_API_TOKEN * fix(docker): forward OD_API_TOKEN to fix docker container boot loop * fix(docker): enforce non-empty OD_API_TOKEN for docker-compose * fix(deploy): automate OD_API_TOKEN generation in installer and close compose loop * docs(readme): guide manual deployment users to configure OD_API_TOKEN * docs(readme): align working directory paths for manual deployment instructions * docs(readme): align working directory paths for manual deployment instructions * docs(readme): restore git clone context for first-time users
44 lines
1.2 KiB
YAML
44 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.}
|
|
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:
|