This commit is contained in:
AlexBa16
2026-06-01 15:37:22 +02:00
parent 90d40ce45e
commit e29bb91853
2 changed files with 18 additions and 0 deletions
+7
View File
@@ -7,6 +7,7 @@ services:
depends_on:
- backend-a
- backend-b
- backend-c
ports:
- "8080:80"
volumes:
@@ -24,3 +25,9 @@ services:
container_name: workshop-backend-b
volumes:
- ./backends/b:/usr/share/nginx/html:ro,z
backend-c:
image: nginx:1.27-alpine
container_name: workshop-backend-c
volumes:
- ./backends/c:/usr/share/nginx/html:ro,z
+11
View File
@@ -16,6 +16,10 @@ http {
server backend-b:80;
}
upstream backend_c {
server backend-c:80;
}
server {
listen 80;
server_name _;
@@ -39,6 +43,13 @@ http {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location /service/c {
proxy_pass http://backend_c/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto http;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
location = /healthz {
default_type text/plain;
return 200 "ok\n";