# docker-compose.yml # Coolify deployment configuration for Mevzuat MCP Server # Domain: mcp-mevzuat.dosya.ai version: '3.8' # Coolify optimized docker-compose for Mevzuat MCP Server # This configuration is specifically designed for deployment on Coolify.io services: mevzuat-mcp: build: . image: mevzuat-mcp:latest # Note: Coolify handles container naming automatically # container_name: mevzuat-mcp-server # Port mapping - Coolify will handle external routing # Note: Remove ports mapping for Coolify - it handles routing automatically # ports: # - "${PORT:-8000}:8000" expose: - "8000" # Environment variables environment: # Core application settings - HOST=0.0.0.0 - PORT=8000 - PYTHONUNBUFFERED=1 - LOG_LEVEL=${LOG_LEVEL:-info} - DEBUG=${DEBUG:-false} # CORS and security - ALLOWED_ORIGINS=${ALLOWED_ORIGINS:-https://flowise.software.vision} - BASE_URL=${BASE_URL:-https://mcp-mevzuat.dosya.ai} # API Key for authentication - MCP_API_KEY=${MCP_API_KEY:-your-secret-api-key-here} # Database connections (if needed in future) - DATABASE_URL=${DATABASE_URL:-} - REDIS_URL=${REDIS_URL:-} # Volume mounts for persistent data volumes: # Persistent logs directory - mevzuat_logs:/app/logs # Optional: configuration override - ./config:/app/config:ro # Resource limits for Coolify deploy: resources: limits: memory: 1G cpus: '0.5' reservations: memory: 512M cpus: '0.25' # Health check healthcheck: test: ["CMD", "python", "-c", "import httpx, os, sys; r=httpx.get(f'http://localhost:{os.getenv(\"PORT\",\"8000\")}/health'); sys.exit(0 if r.status_code==200 else 1)"] interval: 30s timeout: 10s retries: 3 start_period: 30s # Restart policy restart: unless-stopped # Logging configuration logging: driver: "json-file" options: max-size: "10m" max-file: "3" # Network networks: - coolify-network # Networks networks: coolify-network: driver: bridge # Volumes for persistent data volumes: mevzuat_logs: driver: local