{ # Global options auto_https off servers { metrics } } :4000 { # Root directory root * /usr/share/caddy # Logging log { output stdout format json } # Compression encode gzip zstd # Configuration Template templates { mime application/json } # API Proxy (has priority) handle /api/* { reverse_proxy api-gateway:8081 } # Health Check handle /health { respond "healthy" 200 } # Serve static files if they exist, otherwise serve index.html (SPA) file_server try_files {path} /index.html }