From b188607d58010d860489840d415437ace6233a54 Mon Sep 17 00:00:00 2001 From: 21in7 Date: Mon, 16 Mar 2026 21:07:52 +0900 Subject: [PATCH] fix(dashboard): use dynamic DNS resolution for API proxy Nginx caches DNS at startup, so when dashboard-api restarts and gets a new container IP, the proxy breaks with 502. Use Docker's embedded DNS resolver (127.0.0.11) with a variable-based proxy_pass to re-resolve on every request. Co-Authored-By: Claude Opus 4.6 (1M context) --- dashboard/ui/nginx.conf | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard/ui/nginx.conf b/dashboard/ui/nginx.conf index d55ac91..beb640f 100644 --- a/dashboard/ui/nginx.conf +++ b/dashboard/ui/nginx.conf @@ -10,7 +10,9 @@ server { # API 프록시 → 백엔드 컨테이너 location /api/ { - proxy_pass http://dashboard-api:8080; + resolver 127.0.0.11 valid=10s; + set $backend http://dashboard-api:8080; + proxy_pass $backend; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; }