services:
  openwork-host:
    build:
      context: .
      dockerfile: Dockerfile
      args:
        # Keep this in sync with packages/headless/package.json if you want a pinned release.
        OPENWRK_VERSION: 0.11.22
    ports:
      - "8787:8787"
    environment:
      # Set these explicitly for stable sharing.
      # OPENWORK_TOKEN: "..."
      # OPENWORK_HOST_TOKEN: "..."
      # Optional: OPENWORK_APPROVAL_MODE: "auto"
      # Optional: OPENWORK_APPROVAL_TIMEOUT_MS: "30000"
      OPENWRK_DATA_DIR: /data/openwrk
      OPENWRK_SIDECAR_DIR: /data/sidecars
    volumes:
      # Mount an existing project/workspace here.
      - ./workspace:/workspace
      # Persistent host data (OpenCode caches, server config, tokens).
      - ./data:/data
