Serve club logos directly from Caddy instead of Django
Every image request was round-tripping through a gunicorn worker for what is just a static file on disk. Caddy now serves /media/* straight off the shared media_data volume (mounted read-only) and only falls through to Django for anything else — Django's own /media/* route stays as a fallback for compose.behind-proxy.yaml and runserver, where there is no bundled Caddy container.
This commit is contained in:
@@ -25,6 +25,9 @@ services:
|
||||
- ./deploy/caddy/Caddyfile:/etc/caddy/Caddyfile:ro
|
||||
- caddy_data:/data
|
||||
- caddy_config:/config
|
||||
# Read-only: Caddy serves club logos straight off disk instead of round-tripping every
|
||||
# image request through a gunicorn worker. Same volume `web` writes uploads into.
|
||||
- media_data:/srv/media:ro
|
||||
depends_on:
|
||||
- web
|
||||
|
||||
|
||||
Reference in New Issue
Block a user