# ===================================
# MCP Hub — Docker Compose (Standalone)
# ===================================
#
# Usage:
#   cp env.example .env              # edit with your values
#   docker compose up -d
#   curl http://localhost:8000/health
#   open http://localhost:8000/dashboard
#
# For Coolify deployment, use docker-compose.coolify.yaml instead.
# ===================================

services:
  mcp-server:
    build:
      context: .
      dockerfile: Dockerfile
    image: airano/mcphub:latest
    container_name: mcphub
    restart: unless-stopped

    ports:
      - "8000:8000"

    env_file:
      - .env

    environment:
      - PYTHONUNBUFFERED=1

    healthcheck:
      test: ["CMD", "wget", "-qO-", "http://localhost:8000/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

    volumes:
      - mcp-data:/app/data          # SQLite DB, API keys, OAuth data
      - mcp-logs:/app/logs          # Audit logs, health reports
      # Docker socket — only needed for WP-CLI tools (WordPress Advanced plugin)
      # Remove if you don't use wp_cache_flush, wp_transient_*, etc.
      - /var/run/docker.sock:/var/run/docker.sock:ro

    # Docker socket GID — adjust to match your host's docker group
    # Check with: getent group docker | cut -d: -f3
    group_add:
      - "999"

volumes:
  mcp-data:
    driver: local
  mcp-logs:
    driver: local
