This commit is contained in:
pampixz
2026-11-12 14:37:43 +03:00
parent ec540a1a72
commit 6a7f4ec7d4
17 changed files with 749 additions and 24 deletions
+20
View File
@@ -0,0 +1,20 @@
events { worker_connections 1024; }
http {
upstream api_backend {
server api1:8080 max_fails=1 fail_timeout=2s;
server api2:8080 max_fails=1 fail_timeout=2s;
}
server {
listen 8080;
location / {
proxy_pass http://api_backend;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 1s;
proxy_read_timeout 15s;
proxy_next_upstream error timeout http_502 http_503 http_504;
proxy_next_upstream_tries 2;
}
}
}
+9
View File
@@ -0,0 +1,9 @@
{
"identities": [
{
"name": "lab4-api",
"credentials": [{"accessKey": "labminio", "secretKey": "labminio_secret_123"}],
"actions": ["Admin", "Read", "Write", "List"]
}
]
}