docker-compose.prod.yml is the docker-first production stack: the ONEVibe app image (built from the repo Dockerfile) plus a bundled postgres:16-alpine service with named volumes and healthchecks. Model traffic still routes exclusively through the operator-configured LiteLLM relay, and the app container never runs database migrations implicitly.
- Docker Engine with the Compose v2 plugin (
docker compose version). No local Node.js, npm, or Postgres installs are required; the image build needs network access to npm. - A reachable LiteLLM relay endpoint and key (the mandatory model boundary).
cp .env.example .envFill in .env:
POSTGRES_PASSWORD— strong random password for the bundled Postgres service. Keep the password embedded inDATABASE_URLin sync with it.DATABASE_URL— defaults to the internalpostgresservice host, reachable only on the stack network. Change it only for an external database.ONEVIBE_LITELLM_URL/ONEVIBE_LITELLM_API_KEY/ONEVIBE_LITELLM_MODEL— mandatory model boundary.ONECOMPUTER_URL/ONECOMPUTER_HMAC_SECRET— optional ONEComputer governance boundary; leave unset for standalone mode.
docker compose -f docker-compose.prod.yml up -d --buildThis builds the app image, starts Postgres, waits for its pg_isready healthcheck, then starts the app on http://localhost:4311 (override the published port with ONEVIBE_PUBLISH_PORT).
The app never migrates implicitly; /api/health/ready returns 503 until the reviewed Drizzle ledger is current, so the app container reports unhealthy on first boot. Apply the ledger once per deploy (and after upgrades that add migrations):
docker compose -f docker-compose.prod.yml run --rm app node --import=tsx/esm scripts/postgres-ops.ts migrate
docker compose -f docker-compose.prod.yml run --rm app node --import=tsx/esm scripts/postgres-ops.ts verifyThen verify both health contracts:
curl --fail http://localhost:4311/api/health/live
curl --fail http://localhost:4311/api/health/readydocker compose -f docker-compose.prod.yml ps should report both services healthy.
- Data lives in two named volumes:
postgres-data(database) andonevibe-data(app data directory). List them withdocker volume ls. - Back up the database from inside the service, e.g.
docker compose -f docker-compose.prod.yml exec postgres pg_dump -U onevibe onevibe > backup.sql. Take a backup before destructive or long-running migration work. - Upgrade:
git pull, thendocker compose -f docker-compose.prod.yml up -d --build, then re-run themigrate/verifycommands from step 4. Migrations are forward-only; seedocs/DEPLOYMENT-RUNBOOK.mdfor the full release and rollback contract.