fix(nginx): portfolio 프록시를 변수 기반으로 변경
직접 proxy_pass로 portfolio:8000 참조 시 컨테이너 미실행 상태에서 nginx DNS 해석 실패 → 재시작 루프 발생. resolver + 변수 패턴 적용. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -142,12 +142,15 @@ server {
|
|||||||
|
|
||||||
# profile API (Portfolio Service)
|
# profile API (Portfolio Service)
|
||||||
location /api/profile/ {
|
location /api/profile/ {
|
||||||
|
resolver 127.0.0.11 valid=10s;
|
||||||
|
set $portfolio_backend portfolio:8000;
|
||||||
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
proxy_pass http://portfolio:8000/api/profile/;
|
proxy_pass http://$portfolio_backend$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
# agent-office API + WebSocket
|
# agent-office API + WebSocket
|
||||||
|
|||||||
Reference in New Issue
Block a user