1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-28 23:31:47 +02:00
Signed-off-by: Grant Birkinbine <grant.birkinbine@gmail.com>
This commit is contained in:
Grant Birkinbine 2021-04-06 03:54:06 -06:00 committed by GitHub
parent a42a8531ab
commit 4480b64e58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 313 additions and 0 deletions

View file

@ -0,0 +1,29 @@
proxy_cache_path /tmp/cache levels=1:2 keys_zone=cache:10m max_size=500m inactive=60m use_temp_path=off;
server {
listen 80;
location / {
proxy_pass http://$FLASK_SERVER_ADDR;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /cache-me {
proxy_pass http://$FLASK_SERVER_ADDR;
proxy_cache cache;
proxy_cache_lock on;
proxy_cache_valid 200 30s;
proxy_cache_use_stale error timeout updating http_500 http_502 http_503 http_504;
proxy_cache_revalidate on;
proxy_cache_background_update on;
expires 20s;
}
location /health-check {
add_header Content-Type text/plain;
return 200 "success";
}
}