feat 修改nginx配置
All checks were successful
Build image / build (push) Successful in 31m34s

This commit is contained in:
timerzz 2024-05-29 16:18:06 +08:00
parent ff9b8cef58
commit e0d2f9b3ad
2 changed files with 31 additions and 31 deletions

View File

@ -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;"]

View File

@ -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 {