version: '3.8' services: proxy-detection: build: . ports: - "9999:9999" environment: - NODE_ENV=production restart: unless-stopped healthcheck: test: ["CMD", "curl", "-f", "http://localhost:9999/"] interval: 30s timeout: 10s retries: 3 start_period: 10s networks: - proxy-net # Optional: Add a reverse proxy for production nginx: image: nginx:alpine ports: - "80:80" - "443:443" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro # - ./ssl:/etc/nginx/ssl:ro # Add SSL certificates here depends_on: - proxy-detection networks: - proxy-net profiles: - production networks: proxy-net: driver: bridge