Files
infoscreen-dev/src/docker-compose.production.yml

65 lines
1.7 KiB
YAML

version: '3.8'
services:
infoclient:
build:
context: .
dockerfile: Dockerfile.production
# Or use pre-built image:
# image: your-registry/infoclient:${VERSION:-latest}
container_name: infoclient
restart: unless-stopped
environment:
# Production environment
- ENV=production
- DEBUG_MODE=0
- LOG_LEVEL=INFO
# MQTT Configuration
- MQTT_BROKER=${MQTT_BROKER}
- MQTT_PORT=${MQTT_PORT:-1883}
# Production intervals
- HEARTBEAT_INTERVAL=${HEARTBEAT_INTERVAL:-60}
- SCREENSHOT_INTERVAL=${SCREENSHOT_INTERVAL:-300}
# Client identification
- CLIENT_ID=${CLIENT_ID:-auto}
volumes:
# Presentation files - shared with host for presentation display
- /opt/infoscreen/presentations:/app/presentation:rw
# Screenshots - host captures, container reads and transmits
- /opt/infoscreen/screenshots:/app/screenshots:ro
# Persistent configuration (UUID, group ID)
- /opt/infoscreen/config:/app/config:rw
# Logs for monitoring and debugging
- /opt/infoscreen/logs:/app/logs:rw
networks:
- infonet
# Resource limits for Pi
deploy:
resources:
limits:
memory: 256M
cpus: '0.5'
reservations:
memory: 128M
cpus: '0.2'
# Health check
healthcheck:
test: ["CMD", "python", "-c", "import socket; socket.create_connection(('${MQTT_BROKER}', ${MQTT_PORT:-1883}), timeout=5)"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
infonet:
driver: bridge