Add production Docker Compose setup with Nginx and SSL; enhance test fixtures and environment variables for monitoring, logging, and schema caching; and clean up unused imports.

This commit is contained in:
Yûki VACHOT 2025-11-29 02:41:39 +01:00
parent bf5d1b890a
commit 283d7deee4
6 changed files with 109 additions and 58 deletions

View file

@ -10,39 +10,40 @@ services:
ports:
- "${MCP_PORT:-8000}:8000"
environment:
# Required: Your GeoGuessr _ncfa cookie for authentication
- GEOGUESSR_NCFA_COOKIE=${GEOGUESSR_NCFA_COOKIE}
# GeoGuessr Authentication (optional - can use login tool instead)
- GEOGUESSR_NCFA_COOKIE=${GEOGUESSR_NCFA_COOKIE:-}
# MCP Server configuration
- MCP_TRANSPORT=${MCP_TRANSPORT:-streamable-http}
- MCP_HOST=0.0.0.0
- MCP_PORT=8000
# Monitoring configuration
- MONITORING_ENABLED=${MONITORING_ENABLED:-true}
- MONITORING_INTERVAL_HOURS=${MONITORING_INTERVAL_HOURS:-24}
- SCHEMA_CACHE_DIR=/app/data/schemas
# Logging
- LOG_LEVEL=${LOG_LEVEL:-INFO}
volumes:
# Persist schema cache between restarts
- geoguessr-schemas:/app/data/schemas
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
start_period: 15s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Optional: Nginx reverse proxy with SSL (recommended for production)
# Uncomment and configure if you want SSL termination
# nginx:
# image: nginx:alpine
# container_name: geoguessr-mcp-nginx
# restart: unless-stopped
# ports:
# - "80:80"
# - "443:443"
# volumes:
# - ./nginx.conf:/etc/nginx/nginx.conf:ro
# - ./ssl:/etc/nginx/ssl:ro
# depends_on:
# - geoguessr-mcp
volumes:
geoguessr-schemas:
name: geoguessr-mcp-schemas
networks:
default:
name: geoguessr-mcp-network
name: geoguessr-mcp-network