Last commit july 5th

This commit is contained in:
2024-07-05 13:46:23 +02:00
parent dad0d86e8c
commit b0e4dfbb76
24982 changed files with 2621219 additions and 413 deletions

36
.platform/config.vcl Normal file
View File

@@ -0,0 +1,36 @@
acl profile {
# Authorize the local IP address (replace with the IP found above)
"192.168.0.1";
# Authorize Blackfire servers
"46.51.168.2";
"54.75.240.245";
}
sub vcl_recv {
set req.backend_hint = application.backend();
set req.http.Surrogate-Capability = "abc=ESI/1.0";
if (req.method == "PURGE") {
if (req.http.x-purge-token != "PURGE_NOW") {
return(synth(405));
}
return (purge);
}
# Don't profile ESI requests
if (req.esi_level > 0) {
unset req.http.X-Blackfire-Query;
}
# Bypass Varnish when the profile request comes from a known IP
if (req.http.X-Blackfire-Query && client.ip ~ profile) {
return (pass);
}
}
sub vcl_backend_response {
if (beresp.http.Surrogate-Control ~ "ESI/1.0") {
unset beresp.http.Surrogate-Control;
set beresp.do_esi = true;
}
}

View File

@@ -1,2 +1,2 @@
"https://{all}/": { type: upstream, upstream: "app:http" }
"https://{all}/": { type: upstream, upstream: "varnish:http", cache: { enabled: false } }
"http://{all}/": { type: redirect, to: "https://{all}/" }

View File

@@ -1,6 +1,24 @@
database:
type: postgresql:16
disk: 1024
type: postgresql:16
disk: 1024
varnish:
type: varnish:6.0
relationships:
application: 'app:http'
configuration:
vcl: !include
type: string
path: config.vcl
files:
type: network-storage:2.0
disk: 256
rediscache:
type: redis:5.0
queue:
type: rabbitmq:3.7
disk: 1024
size: S