docker-compose.yml•1.74 kB
version: '3.8'
services:
coreflux-mcp-server:
build: .
container_name: coreflux-mcp-server
restart: unless-stopped
# Environment configuration
environment:
- MQTT_BROKER=${MQTT_BROKER:-localhost}
- MQTT_PORT=${MQTT_PORT:-1883}
- MQTT_USER=${MQTT_USER:-root}
- MQTT_PASSWORD=${MQTT_PASSWORD:-coreflux}
- MQTT_CLIENT_ID=${MQTT_CLIENT_ID:-coreflux-mcp-docker}
- MQTT_USE_TLS=${MQTT_USE_TLS:-false}
- MQTT_CA_CERT=${MQTT_CA_CERT}
- MQTT_CLIENT_CERT=${MQTT_CLIENT_CERT}
- MQTT_CLIENT_KEY=${MQTT_CLIENT_KEY}
- DO_AGENT_API_KEY=${DO_AGENT_API_KEY}
- LOG_LEVEL=${LOG_LEVEL:-INFO}
# Mount certificate files if using TLS
volumes:
- ${CERT_PATH:-./certs}:/app/certs:ro
- ./logs:/app/logs
# Network configuration
networks:
- coreflux-network
# Resource limits
deploy:
resources:
limits:
memory: 512M
cpus: '0.5'
reservations:
memory: 128M
cpus: '0.1'
# Health check
healthcheck:
test: ["CMD", "python", "-c", "import sys; sys.exit(0)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
# Optional: Include a Coreflux MQTT broker for development/testing
coreflux-mqtt:
image: eclipse-mosquitto:2.0
container_name: coreflux-mqtt-broker
restart: unless-stopped
ports:
- "1883:1883"
- "9001:9001"
volumes:
- ./mosquitto/config:/mosquitto/config:ro
- ./mosquitto/data:/mosquitto/data
- ./mosquitto/log:/mosquitto/log
networks:
- coreflux-network
profiles:
- with-broker
networks:
coreflux-network:
driver: bridge