# Demo deployment: the controller (no internet access) behind a Caddy proxy that serves HTTPS. # cp .env.prod.example .env and fill it in # docker compose -f docker-compose.prod.yml up -d --build name: led-demo services: controller: build: context: . dockerfile: Dockerfile.prod image: led-controller:prod restart: unless-stopped environment: LED_ADMIN_USER: ${LED_ADMIN_USER:?required} LED_ADMIN_PASSWORD: ${LED_ADMIN_PASSWORD:?required} volumes: - controller-data:/data expose: - "8080" networks: - backend # internal only: the controller cannot reach the internet or the host's network read_only: true tmpfs: - /tmp cap_drop: - ALL security_opt: - no-new-privileges:true pids_limit: 256 mem_limit: 512m proxy: image: caddy:2-alpine restart: unless-stopped depends_on: controller: condition: service_healthy environment: DOMAIN: ${DOMAIN:?required} ports: - "${HTTP_PORT:-80}:80" - "${HTTPS_PORT:-443}:443" volumes: - ./deploy/Caddyfile:/etc/caddy/Caddyfile:ro - caddy-data:/data - caddy-config:/config networks: - backend - public # Caddy needs the internet for public HTTPS certificates networks: backend: internal: true public: {} volumes: controller-data: caddy-data: caddy-config: