diff --git a/Dockerfile b/Dockerfile index dc4247a..c25d298 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,11 @@ FROM node:lts-alpine WORKDIR /build # 设置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镜像 -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 -RUN npm install +RUN yarn COPY ./ /build RUN npm run build diff --git a/nginx.conf b/nginx.conf index dbc3612..09dbdcf 100644 --- a/nginx.conf +++ b/nginx.conf @@ -15,7 +15,7 @@ http { sendfile on; keepalive_timeout 65; upstream backend { - server midway:7001; + server midway:8001; } server { @@ -51,41 +51,41 @@ http { #expires 12h; } - location /im { - proxy_pass http://backend/im; - proxy_connect_timeout 3600s; #配置点1 - proxy_read_timeout 3600s; #配置点2,如果没效,可以考虑这个时间配置长一点 - proxy_send_timeout 3600s; #配置点3 - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header REMOTE-HOST $remote_addr; - #proxy_bind $remote_addr transparent; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - # rewrite /socket/(.*) /$1 break; - proxy_redirect off; +# location /im { +# proxy_pass http://backend/im; +# proxy_connect_timeout 3600s; #配置点1 +# proxy_read_timeout 3600s; #配置点2,如果没效,可以考虑这个时间配置长一点 +# proxy_send_timeout 3600s; #配置点3 +# proxy_set_header Host $host; +# proxy_set_header X-Real-IP $remote_addr; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header REMOTE-HOST $remote_addr; +# #proxy_bind $remote_addr transparent; +# proxy_http_version 1.1; +# proxy_set_header Upgrade $http_upgrade; +# proxy_set_header Connection "upgrade"; +# # rewrite /socket/(.*) /$1 break; +# proxy_redirect off; - } +# } - location /socket { - proxy_pass http://backend/socket; - proxy_connect_timeout 3600s; #配置点1 - proxy_read_timeout 3600s; #配置点2,如果没效,可以考虑这个时间配置长一点 - proxy_send_timeout 3600s; #配置点3 - proxy_set_header Host $host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header REMOTE-HOST $remote_addr; - #proxy_bind $remote_addr transparent; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - rewrite /socket/(.*) /$1 break; - proxy_redirect off; +# location /socket { +# proxy_pass http://backend/socket; +# proxy_connect_timeout 3600s; #配置点1 +# proxy_read_timeout 3600s; #配置点2,如果没效,可以考虑这个时间配置长一点 +# proxy_send_timeout 3600s; #配置点3 +# proxy_set_header Host $host; +# proxy_set_header X-Real-IP $remote_addr; +# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +# proxy_set_header REMOTE-HOST $remote_addr; +# #proxy_bind $remote_addr transparent; +# proxy_http_version 1.1; +# proxy_set_header Upgrade $http_upgrade; +# proxy_set_header Connection "upgrade"; +# rewrite /socket/(.*) /$1 break; +# proxy_redirect off; - } +# } location /adminer/