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
The following commit(s) were added to refs/heads/rocketmq-studio by this push:
new 608daa2 fix: use runtime DNS resolver for Nginx API proxy (#494)
608daa2 is described below
commit 608daa2bb320e67f1911e44c80f4f83c64f2350c
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 0998464..9687647 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 165c0f9..65016a0 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;