prod docker compose fixes.

This commit is contained in:
2025-07-29 20:00:01 +02:00
parent c792ea0bf8
commit 5d3e510f6b
5 changed files with 59 additions and 54 deletions

View File

@@ -8,8 +8,8 @@ import dynamic;
import std;
backend default {
.host = "ghost";
.port = "2368";
.host = "rstat-dashboard";
.port = "5000";
}
acl purge {
@@ -23,7 +23,7 @@ sub vcl_recv {
if (!client.ip ~ purge) {
return(synth(403, "Not allowed."));
}
ban("req.http.host == its.pkhamre.com");
ban("req.http.host == rstat.net");
return(synth(200, "Cache cleared"));
}
@@ -33,16 +33,6 @@ sub vcl_recv {
return(hash);
}
# Don't cache if these cookies are present
if (req.http.Cookie ~ "ghost-members-ssr" || req.http.Cookie ~ "ghost-admin-api-session") {
return(pass);
}
# Don't cache these paths
if (req.url ~ "^/(ghost|members|p)/") {
return(pass);
}
# Remove all cookies for other requests
unset req.http.Cookie;
return(hash);
@@ -50,7 +40,7 @@ sub vcl_recv {
sub vcl_backend_response {
# Cache static files and other content in Varnish for 1 year
set beresp.ttl = 1y;
set beresp.ttl = 1m;
# Enable stale content serving
set beresp.grace = 24h;
# Preserve the origin's Cache-Control header for client-side caching