Added paths for caddy to directly dispatch static assets

This commit is contained in:
2025-06-03 11:27:03 +01:00
parent 70c71568c8
commit 016a313cf6
3 changed files with 11 additions and 0 deletions

View File

@@ -3,6 +3,11 @@
} }
localhost { localhost {
handle /static/* {
root * /var/www/static/
file_server
}
reverse_proxy invenio-rdm:5000 { reverse_proxy invenio-rdm:5000 {
header_down Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0" header_down Cache-Control "no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0"
header_down Pragma "no-cache" header_down Pragma "no-cache"

View File

@@ -3,6 +3,11 @@
} }
invenio.i-form.ie { invenio.i-form.ie {
handle /static/* {
root * /var/www/
file_server
}
reverse_proxy invenio-rdm:5000 reverse_proxy invenio-rdm:5000
encode gzip encode gzip
} }

View File

@@ -12,6 +12,7 @@ services:
volumes: volumes:
- caddy_data:/data - caddy_data:/data
- ./caddy/${INVENIO_ENV}:/etc/caddy - ./caddy/${INVENIO_ENV}:/etc/caddy
- site_data:/var/www:ro
restart: unless-stopped restart: unless-stopped
labels: labels:
- "io.containers.autoupdate=registry" - "io.containers.autoupdate=registry"