This is an automated email from the ASF dual-hosted git repository.

lizhimins pushed a commit to branch rocketmq-studio
in repository https://gitbox.apache.org/repos/asf/rocketmq-dashboard.git

commit 60967f961fe235aa7fbbb40e1f79831e7f7ea526
Author: majialong <[email protected]>
AuthorDate: Fri Jul 24 13:42:01 2026 +0800

    fix: use runtime DNS resolver for Nginx API proxy (#494)
    
    Fix Nginx API proxy failure caused by hardcoded DNS resolver by switching 
to container runtime dynamic resolution.
---
 web/Dockerfile | 4 +++-
 web/nginx.conf | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/web/Dockerfile b/web/Dockerfile
index 0998464d..9687647a 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -8,6 +8,8 @@ RUN npm run build
 
 # Stage 2: Serve
 FROM nginx:alpine
+ENV NGINX_ENTRYPOINT_LOCAL_RESOLVERS=1 \
+    NGINX_ENVSUBST_FILTER=^NGINX_LOCAL_RESOLVERS$
 COPY --from=build /app/dist /usr/share/nginx/html
-COPY nginx.conf /etc/nginx/conf.d/default.conf
+COPY nginx.conf /etc/nginx/templates/default.conf.template
 EXPOSE 80
diff --git a/web/nginx.conf b/web/nginx.conf
index 165c0f93..65016a0a 100644
--- a/web/nginx.conf
+++ b/web/nginx.conf
@@ -9,7 +9,7 @@ server {
     }
 
     location /api/ {
-        resolver 10.89.0.1 valid=10s;
+        resolver ${NGINX_LOCAL_RESOLVERS} valid=10s;
         set $backend http://rocketmq-server:8888;
         proxy_pass $backend;
         proxy_set_header Host $host;

Reply via email to