version: '3.8'
services:
satellite-mcp-server:
build:
context: ..
dockerfile: docker/Dockerfile
container_name: satellite-mcp-server
restart: unless-stopped
# Environment variables
environment:
- PYTHONUNBUFFERED=1
- MCP_SERVER_LOG_LEVEL=${MCP_SERVER_LOG_LEVEL:-INFO}
- TZ=${TZ:-UTC}
# Volume mounts
volumes:
- satellite_logs:/app/logs
- satellite_data:/app/data
# Mount configuration if needed
- ${CONFIG_DIR:-./config}:/app/config:ro
# Resource limits
deploy:
resources:
limits:
memory: 1G
cpus: '1.0'
reservations:
memory: 256M
cpus: '0.25'
# Health check
healthcheck:
test: ["CMD", "python", "-c", "import src.satellite_calc; calc = src.satellite_calc.SatelliteCalculator(); print('OK')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Network configuration
networks:
- satellite-network
# Logging configuration
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
# Security options
security_opt:
- no-new-privileges:true
# Read-only root filesystem for security
read_only: true
tmpfs:
- /tmp:noexec,nosuid,size=100m
# Standard input/output for MCP communication
stdin_open: true
tty: false
# Optional: InfluxDB for storing satellite events
influxdb:
image: influxdb:2.7-alpine
container_name: satellite-influxdb
restart: unless-stopped
environment:
- INFLUXDB_DB=satellite_data
- INFLUXDB_HTTP_AUTH_ENABLED=true
- INFLUXDB_ADMIN_USER=${INFLUXDB_ADMIN_USER:-admin}
- INFLUXDB_ADMIN_PASSWORD=${INFLUXDB_ADMIN_PASSWORD:-changeme}
volumes:
- influxdb_data:/var/lib/influxdb2
- influxdb_config:/etc/influxdb2
ports:
- "${INFLUXDB_PORT:-8086}:8086"
networks:
- satellite-network
# Resource limits
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 128M
cpus: '0.1'
profiles:
- database
# Optional: Grafana for visualization
grafana:
image: grafana/grafana:10.2.0
container_name: satellite-grafana
restart: unless-stopped
environment:
- GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-admin}
- GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-changeme}
- GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-worldmap-panel
volumes:
- grafana_data:/var/lib/grafana
- grafana_config:/etc/grafana
ports:
- "${GRAFANA_PORT:-3000}:3000"
networks:
- satellite-network
depends_on:
- influxdb
profiles:
- visualization
# Networks
networks:
satellite-network:
driver: bridge
name: satellite-network
# Volumes
volumes:
satellite_logs:
name: satellite_logs
satellite_data:
name: satellite_data
influxdb_data:
name: influxdb_data
influxdb_config:
name: influxdb_config
grafana_data:
name: grafana_data
grafana_config:
name: grafana_config