# Production placeholder. Mirrors `Caddyfile.dev` but uses real
# hostnames and lets Caddy auto-provision TLS certificates. Not used
# until prod-deploy plumbing exists; kept under version control so the
# dev/prod surface stays symmetric.

www.galaxy.com {
    root * /srv/galaxy-ui

    # Mirrors the cache policy `Caddyfile.dev` documents in detail:
    # SvelteKit's hash-named `_app/immutable/*` is safe to cache
    # forever; everything else must revalidate so a deploy reaches
    # the browser without a manual cache clear.
    @immutable path /_app/immutable/*
    header @immutable Cache-Control "public, max-age=31536000, immutable"
    @dynamic not path /_app/immutable/*
    header @dynamic Cache-Control "no-cache, must-revalidate"

    try_files {path} /index.html
    file_server
    encode zstd gzip
}

api.galaxy.com {
    reverse_proxy galaxy-api:8080
}
