services:
  gwt:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - .:/gwt
      - bash-history:/root/.bash_history_dir
      - claude-config:/root/.claude
      - codex-config:/root/.codex
      - ${HOME:-${USERPROFILE:?HOME or USERPROFILE must be set}}/.claude:/root/.claude-host:ro
      - ${HOME:-${USERPROFILE:?HOME or USERPROFILE must be set}}/.codex:/root/.codex-host:ro
    ports:
      - ${PORT:-3000}:3000
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      - NPM_USER
      - NPM_EMAIL
      - NPM_PASS
      - GIT_USER_EMAIL
      - GIT_USER_NAME
      - GITHUB_TOKEN
      - GITHUB_PERSONAL_ACCESS_TOKEN
      - GITHUB_USERNAME
      - HISTFILE=/root/.bash_history_dir/.bash_history
      - HISTSIZE=100000
      - HISTFILESIZE=100000
      - MAX_MCP_OUTPUT_TOKENS
      - ENABLE_BACKGROUND_TASKS=1
      - FORCE_AUTO_BACKGROUND_TASKS=1
      - PORT=3000
    stdin_open: true
    tty: true
    working_dir: /gwt

  playwright-novnc:
    image: ghcr.io/xtr-dev/mcp-playwright-novnc:latest
    platform: ${PLAYWRIGHT_NOVNC_PLATFORM:-linux/amd64}
    ports:
      - ${PLAYWRIGHT_NOVNC_PORT:-6080}:6080
      - ${PLAYWRIGHT_NOVNC_VNC_PORT:-3080}:3080
    volumes:
      - .:/gwt
    environment:
      - SCREEN_WIDTH=1920
      - SCREEN_HEIGHT=1080
      - SCREEN_DEPTH=24
      - MCP_BROWSER=chromium
      - PLAYWRIGHT_BASE_URL=http://gwt:3000
    working_dir: /gwt
    shm_size: 2gb
    depends_on:
      - gwt

volumes:
  bash-history: {}
  claude-config: {}
  codex-config: {}
