# One-command local stack for Daneel (default template). Switch the UI to the # HiringAI startup-tuned template by setting APP_TEMPLATE=hiringai on the api # service and rebuilding the web image with VITE_APP_TEMPLATE=hiringai. # # Usage (uses prebuilt images from GHCR — near-instant first boot): # cp .env.example .env # docker compose up # # To build the images from source instead (for contributors changing code): # docker compose -f docker-compose.yml -f docker-compose.dev.yml up --build # # Image tag override (defaults to `latest`): # IMAGE_TAG=v0.4.0 docker compose up # # Services: # db — Postgres 16 (host port 5432) # api — Express API (host port 3000, /api) # web — React + nginx (host port 5173, proxies /api -> api:3000) name: daneel networks: daneel: driver: bridge services: db: image: postgres:16 restart: unless-stopped networks: [daneel] environment: POSTGRES_USER: daneel POSTGRES_PASSWORD: daneel POSTGRES_DB: daneel ports: - "5432:5432" volumes: - daneel_pgdata:/var/lib/postgresql/data healthcheck: test: ["CMD-SHELL", "pg_isready -U daneel -d daneel"] interval: 5s timeout: 5s retries: 20 api: image: ghcr.io/gregherbe76/daneel-api:${IMAGE_TAG:-latest} restart: unless-stopped networks: [daneel] depends_on: db: condition: service_healthy environment: NODE_ENV: production PORT: "3000" DATABASE_URL: ${DATABASE_URL:-postgresql://daneel:daneel@db:5432/daneel} SESSION_SECRET: ${SESSION_SECRET:-dev-session-secret-change-me} ANTHROPIC_API_KEY: ${ANTHROPIC_API_KEY:-} OPENAI_API_KEY: ${OPENAI_API_KEY:-} APP_TEMPLATE: daneel ports: - "3000:3000" healthcheck: test: - "CMD-SHELL" - "node -e \"fetch('http://localhost:3000/api/healthz').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))\"" interval: 10s timeout: 5s retries: 30 # First boot has to run drizzle-kit push + idempotent demo seed before # the server starts listening, which can easily take >60s on slower # hosts. Give it room so the api isn't marked unhealthy prematurely. start_period: 180s web: image: ghcr.io/gregherbe76/daneel-web:${IMAGE_TAG:-latest} restart: unless-stopped networks: [daneel] depends_on: api: condition: service_healthy ports: - "5173:5173" healthcheck: test: ["CMD-SHELL", "wget -q -O - http://localhost:5173/ >/dev/null || exit 1"] interval: 10s timeout: 5s retries: 10 start_period: 10s volumes: daneel_pgdata: