mirror of
https://github.com/nexu-io/open-design.git
synced 2026-06-01 03:14:35 +07:00
72 lines
2.6 KiB
YAML
72 lines
2.6 KiB
YAML
# Phase 5 / spec §15.4 — reference Docker Compose manifest.
|
|
#
|
|
# Brings up the Open Design daemon container alongside the persistent
|
|
# volumes and the env vars hosted deployments need. Drop this file into
|
|
# any directory and run `docker compose up -d` — the only required
|
|
# customisation is the OD_API_TOKEN secret and the provider keys.
|
|
#
|
|
# Build the image first (from the repo root):
|
|
#
|
|
# docker build -f deploy/Dockerfile -t open-design/od:dev .
|
|
#
|
|
# Or pull a published tag:
|
|
#
|
|
# docker pull ghcr.io/open-design/od:edge
|
|
#
|
|
# Then `docker compose -f tools/pack/docker-compose.yml up -d`.
|
|
|
|
version: "3.9"
|
|
|
|
services:
|
|
od:
|
|
# The image tag the operator wants. Spec §15.5 expects multi-arch
|
|
# ghcr.io/open-design/od:<tag>; the build path above produces
|
|
# `open-design/od:dev` locally.
|
|
image: ${OD_IMAGE:-ghcr.io/open-design/od:edge}
|
|
container_name: od
|
|
|
|
# Spec §15.3 — every dimension the daemon respects in headless
|
|
# mode. OD_BIND_HOST=0.0.0.0 + OD_API_TOKEN is the canonical
|
|
# hosted-mode tuple; remove these two if running on a private
|
|
# docker network with an upstream reverse proxy that already
|
|
# gates access.
|
|
environment:
|
|
OD_BIND_HOST: ${OD_BIND_HOST:-0.0.0.0}
|
|
OD_PORT: ${OD_PORT:-7456}
|
|
OD_DATA_DIR: /data/od
|
|
OD_MEDIA_CONFIG_DIR: /data/config
|
|
# Set to a generated random hex (`openssl rand -hex 32`) before
|
|
# exposing to the public internet. Phase 5 wires the daemon to
|
|
# refuse OD_BIND_HOST=0.0.0.0 without OD_API_TOKEN.
|
|
OD_API_TOKEN: ${OD_API_TOKEN:-}
|
|
# Snapshot retention knobs (spec §11.4 PB2). Default ttl is 30
|
|
# days; set to 0 to keep snapshots forever.
|
|
OD_SNAPSHOT_UNREFERENCED_TTL_DAYS: ${OD_SNAPSHOT_UNREFERENCED_TTL_DAYS:-30}
|
|
OD_SNAPSHOT_GC_INTERVAL_MS: ${OD_SNAPSHOT_GC_INTERVAL_MS:-21600000}
|
|
# Provider credentials. Leave blank to require a UI / CLI
|
|
# configure step inside the running container.
|
|
ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-}
|
|
TAVILY_API_KEY: ${TAVILY_API_KEY:-}
|
|
|
|
# Two-volume layout per spec §15.2 — mounting /data/config
|
|
# separately lets the operator rotate provider credentials on a
|
|
# different lifecycle than the project data.
|
|
volumes:
|
|
- od-data:/data/od
|
|
- od-config:/data/config
|
|
|
|
ports:
|
|
- "${OD_PORT:-7456}:${OD_PORT:-7456}"
|
|
|
|
restart: unless-stopped
|
|
|
|
healthcheck:
|
|
# /api/daemon/status is the canonical lifecycle probe (Phase 1.5).
|
|
test: ["CMD-SHELL", "wget -qO- http://127.0.0.1:${OD_PORT:-7456}/api/daemon/status >/dev/null 2>&1 || exit 1"]
|
|
interval: 30s
|
|
timeout: 5s
|
|
retries: 3
|
|
|
|
volumes:
|
|
od-data: {}
|
|
od-config: {}
|