# PiCloud production Caddyfile. # # Set PICLOUD_DOMAIN and PICLOUD_ADMIN_EMAIL in the environment Caddy is # started from (docker-compose.prod.yml passes them through). Caddy then # obtains and renews a Let's Encrypt cert automatically for that domain. { email {$PICLOUD_ADMIN_EMAIL} } {$PICLOUD_DOMAIN} { encode zstd gzip handle /healthz { reverse_proxy picloud:8080 } handle /version { reverse_proxy picloud:8080 } handle /api/v1/admin/* { reverse_proxy picloud:8080 } handle /api/v1/execute/* { reverse_proxy picloud:8080 } handle /api/* { respond 404 { body "{\"error\":\"no such API version — see /version for supported routes\"}" close } } handle /admin/* { reverse_proxy dashboard:80 } handle /admin { reverse_proxy dashboard:80 } handle { reverse_proxy picloud:8080 } log { output stdout format json } }