Archon/docker-compose.yml
Cole Medin f2a0d029e7 SQLite-first docs, fix Postgres workflow_runs default, rebuild combined schema
- Fix workflow_runs.status DEFAULT from 'running' to 'pending' in Postgres
  (migration 018) to match SQLite and actual code flow
- Rebuild 000_combined.sql as clean final schema (7 tables, no stale columns,
  correct defaults, all indexes)
- Update all docs to present SQLite as the default, zero-setup option
- Mark PostgreSQL as optional/advanced in README, CLAUDE.md, and guides

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-17 11:23:59 -06:00

71 lines
2.1 KiB
YAML

services:
# Use this for external databases (Supabase, Neon, etc.)
# Command: docker-compose --profile external-db up
app:
profiles: ["external-db"]
build: .
env_file: .env
environment:
# Signal Docker environment for Archon path detection
ARCHON_DOCKER: "true"
ports:
- "${PORT:-3000}:${PORT:-3000}"
volumes:
- archon_data:/.archon # All Archon-managed data (workspaces, worktrees, config)
restart: unless-stopped
dns:
- 8.8.8.8
- 8.8.4.4
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
# Use this for local Docker database (only needed when using PostgreSQL)
# SQLite is the default for local dev — no database container required.
# Command: docker-compose --profile with-db up
app-with-db:
profiles: ["with-db"]
build: .
env_file: .env
environment:
# Override DATABASE_URL to use Docker service name
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/remote_coding_agent
# Signal Docker environment for Archon path detection
ARCHON_DOCKER: "true"
ports:
- "${PORT:-3000}:${PORT:-3000}"
volumes:
- archon_data:/.archon # All Archon-managed data (workspaces, worktrees, config)
restart: unless-stopped
dns:
- 8.8.8.8
- 8.8.4.4
sysctls:
- net.ipv6.conf.all.disable_ipv6=1
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:18
profiles: ["with-db"]
environment:
POSTGRES_DB: remote_coding_agent
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
volumes:
- postgres_data:/var/lib/postgresql
# Auto-run combined migration on first startup
- ./migrations/000_combined.sql:/docker-entrypoint-initdb.d/000_combined.sql:ro
# Mount all migrations for manual updates (accessible via /migrations inside container)
- ./migrations:/migrations:ro
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
volumes:
postgres_data:
archon_data: # Persistent Archon data