This commit is contained in:
icssoa 2022-06-30 11:34:06 +08:00
commit 4d0064fafd
2 changed files with 36 additions and 36 deletions

View File

@ -1,11 +1,11 @@
FROM node:lts-alpine FROM node:lts-alpine
WORKDIR /build WORKDIR /build
# 设置Node-Sass的镜像地址 # 设置Node-Sass的镜像地址
RUN npm config set sass_binary_site https://repo.huaweicloud.com/node-sass RUN npm config set sass_binary_site=https://npm.taobao.org/mirrors/node-sass/
# 设置npm镜像 # 设置npm镜像
RUN npm config set registry https://repo.huaweicloud.com/repository/npm/ RUN npm config set registry https://registry.npm.taobao.org
COPY package.json /build/package.json COPY package.json /build/package.json
RUN npm install RUN yarn
COPY ./ /build COPY ./ /build
RUN npm run build RUN npm run build

View File

@ -15,7 +15,7 @@ http {
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
upstream backend { upstream backend {
server midway:7001; server midway:8001;
} }
server { server {
@ -51,41 +51,41 @@ http {
#expires 12h; #expires 12h;
} }
location /im { # location /im {
proxy_pass http://backend/im; # proxy_pass http://backend/im;
proxy_connect_timeout 3600s; #配置点1 # proxy_connect_timeout 3600s; #配置点1
proxy_read_timeout 3600s; #配置点2,如果没效,可以考虑这个时间配置长一点 # proxy_read_timeout 3600s; #配置点2,如果没效,可以考虑这个时间配置长一点
proxy_send_timeout 3600s; #配置点3 # proxy_send_timeout 3600s; #配置点3
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 REMOTE-HOST $remote_addr; # proxy_set_header REMOTE-HOST $remote_addr;
#proxy_bind $remote_addr transparent; # #proxy_bind $remote_addr transparent;
proxy_http_version 1.1; # proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; # proxy_set_header Connection "upgrade";
# rewrite /socket/(.*) /$1 break; # # rewrite /socket/(.*) /$1 break;
proxy_redirect off; # proxy_redirect off;
} # }
location /socket { # location /socket {
proxy_pass http://backend/socket; # proxy_pass http://backend/socket;
proxy_connect_timeout 3600s; #配置点1 # proxy_connect_timeout 3600s; #配置点1
proxy_read_timeout 3600s; #配置点2,如果没效,可以考虑这个时间配置长一点 # proxy_read_timeout 3600s; #配置点2,如果没效,可以考虑这个时间配置长一点
proxy_send_timeout 3600s; #配置点3 # proxy_send_timeout 3600s; #配置点3
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 REMOTE-HOST $remote_addr; # proxy_set_header REMOTE-HOST $remote_addr;
#proxy_bind $remote_addr transparent; # #proxy_bind $remote_addr transparent;
proxy_http_version 1.1; # proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade; # proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade"; # proxy_set_header Connection "upgrade";
rewrite /socket/(.*) /$1 break; # rewrite /socket/(.*) /$1 break;
proxy_redirect off; # proxy_redirect off;
} # }
location /adminer/ location /adminer/