docker/rootfs/etc/Caddyfile
{
admin off
auto_https off
}
:80
root * /{$ZEALOT_PATH:app}/public
encode zstd gzip
file_server
log {
output file /{$ZEALOT_PATH:app}/log/caddy.log {
roll_size 50mb
roll_keep 5
roll_keep_for 720h
}
}
# handle reverse proxy crash errors
handle_errors {
@5xx `{err.status_code} >= 500 && {err.status_code} < 600`
handle @5xx {
rewrite * /errors/{err.status_code}.html
file_server
}
}
@zealot {
path *
# static files
not file
}
reverse_proxy @zealot {
to localhost:3000
health_uri /health
health_interval 1s
health_timeout 30s
header_up X-Forwarded-Proto https
@accel header X-Accel-Redirect *
handle_response @accel {
rewrite * {http.reverse_proxy.header.X-Accel-Redirect}
file_server
}
}