Repository navigation
fix(nginx): update backend configuration to use variables for optiona… - #134
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the NGINX gateway routing for optional backend services by removing static upstream blocks for web and minio and switching those locations to variable-based proxy_pass targets, aiming to avoid startup failures when optional services are absent.
Changes:
- Removed
upstream web_backendandupstream minio_backendblocks. - Updated
/storage/toset $minio_backend ...andproxy_pass $minio_backend/. - Updated
/toset $web_backend ...andproxy_pass $web_backend.
Comments suppressed due to low confidence (1)
deploy/nginx/gateway.conf:254
- Same resolver issue as
/storage/:$web_backendcontains the hostnameweb, and variable-basedproxy_passneeds an explicitresolverdirective or requests will error at runtime. Please add a resolver at http/server scope (or use anupstreamwithresolve) so the name can be resolved dynamically.
location / {
set $web_backend http://web:3000;
proxy_pass $web_backend;
proxy_http_version 1.1;
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Contributor
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot stopped work on behalf of
pikann due to an error
May 22, 2026 10:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the NGINX gateway configuration to improve flexibility and reliability when handling optional backend services. The changes remove static upstream blocks for services that may not always be running (such as
webandminio) and instead use NGINX variables for dynamic backend resolution. This approach allows for more graceful startup and operation when optional services are unavailable.Improvements to NGINX backend configuration:
upstreamblocks forwebandminioservices, replacing them with NGINX variables to allow for conditional backend resolution and more graceful handling when these services are not running./storage/location to use a variable ($minio_backend) for the MinIO backend address, instead of referencing a static upstream block./location to use a variable ($web_backend) for the web backend address, instead of referencing a static upstream block.