diff --git a/Dockerfile b/Dockerfile index c361cdb..3d1de65 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,9 @@ RUN bun install && bun run build FROM nginx:alpine COPY --from=front /build/dist /usr/share/dist -RUN #rm /etc/nginx/conf.d/default.conf +RUN rm /etc/nginx/conf.d/default.conf # 将自定义配置文件nginx.conf复制到容器内/etc/nginx/conf.d/目录 -#ADD ./nginx.conf /etc/nginx/conf.d/ +ADD ./nginx.conf /etc/nginx/conf.d/ CMD ["nginx", "-g", "daemon off;"] \ No newline at end of file diff --git a/nginx.conf b/nginx.conf index 2cf7302..f38a16c 100644 --- a/nginx.conf +++ b/nginx.conf @@ -9,35 +9,35 @@ server { index index.html index.htm; } - location /api/v1/proxies { - resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS - proxy_pass http://ht-watcher:8080; - } - - location /api/v1/pushers { - resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS - proxy_pass http://pusher:8080; - } - - location /api/v1/push { - resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS - proxy_pass http://pusher:8080; - } - - location /api/v1/watchers { - resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS - proxy_pass http://ht-watcher:8080; - } - - location /api/v1/spider{ - resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS - proxy_pass http://product-spider:8080; - } - - location /api/v1/products { - resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS - proxy_pass http://product-backend:8080; - } +; location /api/v1/proxies { +; resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS +; proxy_pass http://ht-watcher:8080; +; } +; +; location /api/v1/pushers { +; resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS +; proxy_pass http://pusher:8080; +; } +; +; location /api/v1/push { +; resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS +; proxy_pass http://pusher:8080; +; } +; +; location /api/v1/watchers { +; resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS +; proxy_pass http://ht-watcher:8080; +; } +; +; location /api/v1/spider{ +; resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS +; proxy_pass http://product-spider:8080; +; } +; +; location /api/v1/products { +; resolver 10.43.0.10 valid=10s; # 6.6.6.6 为自建DNS +; proxy_pass http://product-backend:8080; +; } error_page 500 502 503 504 /50x.html; location = /50x.html {