Skip to content

Commit

Permalink
Fix: this prevents nginx to emergency shutdown (host xxx not found in…
Browse files Browse the repository at this point in the history
… upstream) if an optional service is not started;

Signed-off-by: Giuseppe Bertone <[email protected]>
  • Loading branch information
Neurone committed Jul 10, 2024
1 parent f13a595 commit 23ab563
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
12 changes: 9 additions & 3 deletions web-proxy/configs/default.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ server {
}

location /mrv-sender/ {
proxy_pass http://mrv-sender:3005/;
resolver 127.0.0.11 valid=600s;
set $target http://mrv-sender:3005/;
proxy_pass $target;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -68,7 +70,9 @@ server {
}

location /topic-viewer/ {
proxy_pass http://topic-viewer:3006/;
resolver 127.0.0.11 valid=600s;
set $target http://topic-viewer:3006/;
proxy_pass $target;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -86,7 +90,9 @@ server {
}

location /mongo-admin {
proxy_pass http://mongo-express:8081;
resolver 127.0.0.11 valid=600s;
set $target http://mongo-express:8081;
proxy_pass $target;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
8 changes: 6 additions & 2 deletions web-proxy/configs/demo.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ server {
}

location /mrv-sender/ {
proxy_pass http://${MRV_SENDER_HOST}:${MRV_SENDER_PORT}/;
resolver 127.0.0.11 valid=600s;
set $target http://${MRV_SENDER_HOST}:${MRV_SENDER_PORT}/;
proxy_pass $target;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -68,7 +70,9 @@ server {
}

location /topic-viewer/ {
proxy_pass http://${TOPIC_VIEWER_HOST}:${TOPIC_VIEWER_PORT}/;
resolver 127.0.0.11 valid=600s;
set $target http://${TOPIC_VIEWER_HOST}:${TOPIC_VIEWER_PORT}/;
proxy_pass $target;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
Expand Down
8 changes: 6 additions & 2 deletions web-proxy/configs/local.conf
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ server {
}

location /mrv-sender/ {
proxy_pass http://mrv-sender:3005/;
resolver 127.0.0.11 valid=600s;
set $target http://mrv-sender:3005/;
proxy_pass $target;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
Expand All @@ -68,7 +70,9 @@ server {
}

location /topic-viewer/ {
proxy_pass http://topic-viewer:3006/;
resolver 127.0.0.11 valid=600s;
set $target http://topic-viewer:3006/;
proxy_pass $target;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
Expand Down

0 comments on commit 23ab563

Please sign in to comment.