# Dashboard production Caddy config. Serves the static SPA and proxies
# /api/* and /ws to the client2server server.

:80 {
    # API + WS reverse-proxy to the server
    reverse_proxy /api/* server1:3843
    reverse_proxy /ws server1:3843
    reverse_proxy /health server1:3843

    # SPA: serve static files, fall back to index.html for client routing
    root * /srv
    try_files {path} /index.html
    file_server

    encode gzip zstd
}
