website/docker/Caddyfile

40 lines
589 B
Caddyfile

{
auto_https off
log {
output stderr
format console
level ERROR
}
}
:8080 {
# Health check endpoint
handle /healthz {
respond "OK" 200
}
# Handle static files
handle /static/* {
uri strip_prefix /static
root * /app/staticfiles
file_server
}
# Handle media files
handle /media/* {
uri strip_prefix /media
root * /app/mediafiles
file_server
}
# Proxy all other requests to Gunicorn
handle {
reverse_proxy unix//run/gunicorn.sock
}
respond /healthz "OK" 200
header Cache-Control no-cache
# Basic compression for better performance
encode gzip
}