services: warmbox: build: . image: warmbox:local restart: unless-stopped env_file: .env environment: DATABASE_URL: file:/data/warmbox.db NODE_ENV: production volumes: - warmbox-data:/data # No host ports — reach Warmbox via Docker network only (NPM or Cloudflare Tunnel). # For LAN debugging only, temporarily add: ports: ["127.0.0.1:3001:3000"] healthcheck: test: ['CMD', 'node', '-e', "fetch('http://127.0.0.1:3000/health').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"] interval: 30s timeout: 5s retries: 3 start_period: 40s networks: - warmbox_internal # Cloudflare Tunnel connector — shares warmbox_internal with the app. cloudflared: profiles: [cloudflare] image: cloudflare/cloudflared:latest restart: unless-stopped depends_on: warmbox: condition: service_healthy command: tunnel run environment: TUNNEL_TOKEN: ${CLOUDFLARE_TUNNEL_TOKEN} networks: - warmbox_internal # Standalone Caddy — only if you do NOT already run Nginx Proxy Manager on 80/443. caddy: profiles: [caddy] image: caddy:2-alpine restart: unless-stopped depends_on: warmbox: condition: service_healthy ports: - '80:80' - '443:443' volumes: - ./deploy/Caddyfile:/etc/caddy/Caddyfile:ro - caddy-data:/data - caddy-config:/config networks: - warmbox_internal volumes: warmbox-data: caddy-data: caddy-config: networks: warmbox_internal: name: warmbox_internal