Files
helix/docker-compose.yml
Rene De Ren 103ba3cb5d build: tighten Docker setup for local-stack parity
- Dockerfile: npm ci (uses package-lock for reproducible installs)
- CMD now: migrate → seed (idempotent) → start. Gated by SEED_ON_BOOT.
- docker-compose: name: helix, healthcheck on /, OAuth env defaults to empty
  so `docker compose up` works without a .env (public pages render; sign-in
  fails until OAuth is configured).
- README: explicit "Run it locally — two ways" section. Docker first
  (production-like), native Node second. Documents port-conflict workaround
  and Gitea OAuth setup.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-20 11:05:06 +02:00

32 lines
900 B
YAML

name: helix
services:
helix:
build:
context: .
container_name: helix
restart: unless-stopped
ports:
- "${HELIX_PORT:-3000}:3000"
environment:
NODE_ENV: production
PORT: 3000
ORIGIN: ${ORIGIN:-http://localhost:3000}
DATABASE_URL: /data/helix.db
GITEA_BASE_URL: ${GITEA_BASE_URL:-https://gitea.wbd-rd.nl}
GITEA_CLIENT_ID: ${GITEA_CLIENT_ID:-}
GITEA_CLIENT_SECRET: ${GITEA_CLIENT_SECRET:-}
GITEA_REDIRECT_URI: ${GITEA_REDIRECT_URI:-http://localhost:3000/auth/gitea/callback}
GITEA_ALLOWED_ORG: ${GITEA_ALLOWED_ORG:-RnD}
volumes:
- helix-data:/data
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3000/').then(r => process.exit(r.ok ? 0 : 1)).catch(() => process.exit(1))"]
interval: 15s
timeout: 5s
retries: 4
start_period: 10s
volumes:
helix-data: