website/docker/Caddyfile

41 lines
593 B
Text
Raw Normal View History

2025-01-30 15:12:50 +01:00
{
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 {
2025-01-30 16:51:52 +01:00
reverse_proxy unix//app/run/gunicorn.sock
2025-01-30 15:12:50 +01:00
}
respond /healthz "OK" 200
header Cache-Control no-cache
# Basic compression for better performance
encode gzip
}