website/docker/Caddyfile

51 lines
681 B
Text
Raw Normal View History

2025-01-30 15:12:50 +01:00
{
auto_https off
2025-01-30 18:06:18 +01:00
http_port 8080
https_port 0
2025-01-30 19:09:04 +01:00
cert_issuer internal
skip_install_trust
2025-01-30 18:06:18 +01:00
2025-01-30 15:12:50 +01:00
log {
output stderr
format console
2025-01-30 17:15:36 +01:00
level INFO
2025-01-30 15:12:50 +01:00
}
2025-01-30 18:06:18 +01:00
2025-01-30 19:09:04 +01:00
servers {
protocols h1
}
2025-01-30 18:06:18 +01:00
storage file_system {
root /app/run/caddy
}
2025-01-30 15:12:50 +01:00
}
: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
2025-01-30 19:09:04 +01:00
root * /data/media
2025-01-30 15:12:50 +01:00
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
}
# Basic compression for better performance
encode gzip
}