services: autopilot: build: . image: autopilot:latest ports: - '${PORT:-8080}:8080' environment: # --- target repository --- GITHUB_OWNER: ${GITHUB_OWNER:-watilde} GITHUB_REPO: ${GITHUB_REPO:-superset} GITHUB_TOKEN: ${GITHUB_TOKEN:-} GITHUB_WEBHOOK_SECRET: ${GITHUB_WEBHOOK_SECRET:-} # Defaults to true so `docker compose up` works with no .env at all. # Set to false (and provide a secret) for anything reachable publicly. ALLOW_UNSIGNED_WEBHOOKS: ${ALLOW_UNSIGNED_WEBHOOKS:-true} # --- devin --- # mock by default: a reviewer can bring the whole system up and watch it # work without a key and without spending ACUs. DEVIN_MODE: ${DEVIN_MODE:-mock} DEVIN_API_KEY: ${DEVIN_API_KEY:-} # Host only. The client appends /v1 or /v3 from the credential. DEVIN_API_BASE_URL: ${DEVIN_API_BASE_URL:-https://api.devin.ai} # Normally inferred from the key prefix; set only to override. DEVIN_API_VERSION: ${DEVIN_API_VERSION:-} # Required when the key starts with `cog_` (v3). Without it the server # refuses to start in live mode, by design -- so it has to reach the # container, or `docker compose up` works in mock and fails for real. DEVIN_ORG_ID: ${DEVIN_ORG_ID:-} DEVIN_MAX_ACU: ${DEVIN_MAX_ACU:-10} DEVIN_PLAYBOOK_ID: ${DEVIN_PLAYBOOK_ID:-} # --- policy --- AUTOPILOT_LABEL: ${AUTOPILOT_LABEL:-autopilot} MAX_CI_REWORKS: ${MAX_CI_REWORKS:-2} MAX_REVIEW_REWORKS: ${MAX_REVIEW_REWORKS:-2} # A second session reviews the pull request once CI is green. Off by # default; a second opinion, not independent evidence — see .env.example. REVIEW_AGENT: ${REVIEW_AGENT:-false} # Empty means the repository's default branch. Set to an integration # branch to let a merge actually happen: Devin's tooling refuses # main/master unconditionally. PR_BASE_BRANCH: ${PR_BASE_BRANCH:-} # Off by default here too: merging is the one irreversible step, and a # container that merges unattended has to have been told to. AUTO_MERGE: ${AUTO_MERGE:-false} AUTO_MERGE_CATEGORIES: ${AUTO_MERGE_CATEGORIES:-code-quality} AUTO_MERGE_GRACE_MS: ${AUTO_MERGE_GRACE_MS:-600000} # An audit older than this is written off. A session cancelled on the # Devin dashboard is indistinguishable from one asking a question, so # without a bound one cancellation kills the audit button for good. AUDIT_TIMEOUT_MS: ${AUDIT_TIMEOUT_MS:-1800000} MAX_CONCURRENT_SESSIONS: ${MAX_CONCURRENT_SESSIONS:-3} RECONCILE_INTERVAL_MS: ${RECONCILE_INTERVAL_MS:-15000} SESSION_TIMEOUT_MS: ${SESSION_TIMEOUT_MS:-3600000} POST_ISSUE_COMMENTS: ${POST_ISSUE_COMMENTS:-true} LOG_LEVEL: ${LOG_LEVEL:-info} NODE_ENV: production volumes: - autopilot-data:/data restart: unless-stopped healthcheck: test: ['CMD', 'wget', '-qO-', 'http://127.0.0.1:8080/healthz'] interval: 30s timeout: 3s retries: 3 start_period: 5s volumes: autopilot-data: