services:
  matrix-bot:
    image: "${SURFACES_BOT_IMAGE:?Set SURFACES_BOT_IMAGE to the pushed image, e.g. mput1/surfaces-bot:latest}"
    environment:
      MATRIX_HOMESERVER: ${MATRIX_HOMESERVER:-}
      MATRIX_USER_ID: ${MATRIX_USER_ID:-}
      MATRIX_PASSWORD: ${MATRIX_PASSWORD:-}
      MATRIX_ACCESS_TOKEN: ${MATRIX_ACCESS_TOKEN:-}
      MATRIX_PLATFORM_BACKEND: ${MATRIX_PLATFORM_BACKEND:-real}
      MATRIX_AGENT_REGISTRY_PATH: ${MATRIX_AGENT_REGISTRY_PATH:-/app/config/matrix-agents.yaml}
      AGENT_BASE_URL: ${AGENT_BASE_URL:-}
      SURFACES_WORKSPACE_DIR: ${SURFACES_WORKSPACE_DIR:-/agents}
      MATRIX_DB_PATH: /app/state/lambda_matrix.db
      MATRIX_STORE_PATH: /app/state/matrix_store
      PYTHONUNBUFFERED: "1"
    volumes:
      - agents:/agents
      - bot-state:/app/state
      - ./config:/app/config:ro
    restart: unless-stopped

volumes:
  agents:
    name: ${SURFACES_SHARED_VOLUME:-surfaces-agents}
  bot-state:
    name: ${SURFACES_BOT_STATE_VOLUME:-surfaces-bot-state}
