services: # Use this for external databases (Supabase, Neon, etc.) # Command: docker-compose --profile external-db up app: profiles: ["external-db"] build: . env_file: .env ports: - "${PORT:-3000}:3000" volumes: - ${WORKSPACE_PATH:-./workspace}:/workspace 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 # 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 ports: - "${PORT:-3000}:3000" volumes: - ${WORKSPACE_PATH:-./workspace}:/workspace 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/data - ./migrations:/docker-entrypoint-initdb.d ports: - "${POSTGRES_PORT:-5432}:5432" healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 volumes: postgres_data: