version: '3.8' services: mcp-database-server: image: mcp-database-server:1.0.0 container_name: mcp-database-server restart: unless-stopped ports: - "17700:7700" environment: # Server configuration MCP_LOG_LEVEL: info MCP_LISTEN: "0.0.0.0:7700" volumes: # Configuration file - ./config/database.json:/app/config/database.json:ro - ./postgres-data:/var/lib/postgresql/data healthcheck: test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:7700/health"] interval: 30s timeout: 10s retries: 3 start_period: 10s networks: - mcp-network # Resource limits #deploy: # resources: # limits: # cpus: '1.0' # memory: 512M # reservations: # cpus: '0.25' # memory: 128M # Usage: # # 1. Copy this file: # cp docker-compose.example.yml docker-compose.yml # # 2. Create your configuration: # cp config/database.example.json config/database.json # # Edit config/database.json with your database connections # # 3. Generate an auth token: # node scripts/generate-token.js # # 4. Create .env file with secrets: # echo "MCP_AUTH_TOKEN=your-generated-token" >> .env # echo "MCP_DRWORKS_PASSWORD=your-db-password" >> .env # # 5. Start the server: # docker compose up -d # # 6. Check health: # curl http://localhost:7700/health # # 7. For local development with PostgreSQL: # docker compose --profile dev up -d