update nginx proxypass
This commit is contained in:
parent
76c3d57f55
commit
a4e21ec909
@ -29,7 +29,7 @@ FROM nginx:1.26-alpine3.19 AS runner
|
||||
WORKDIR /app
|
||||
|
||||
# envs 配置
|
||||
ENV APP_API_URL http://localhost:50000
|
||||
ENV APP_API_URL localhost:50000
|
||||
|
||||
# nginx配置文件
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf.template
|
||||
|
@ -1,3 +1,7 @@
|
||||
upstream payment_backend {
|
||||
server $APP_API_URL;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
@ -22,7 +26,7 @@ server {
|
||||
}
|
||||
|
||||
location ^~/api {
|
||||
proxy_pass $APP_API_URL;
|
||||
proxy_pass http://payment_backend;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
Loading…
x
Reference in New Issue
Block a user