diff --git a/Dockerfile b/Dockerfile index 5731814..10a6288 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ RUN mkdir -p /apps COPY . /apps WORKDIR /apps ## 安装依赖 -RUN npm ci --registry https://registry.npmmirror.com && npm run build +RUN npm i --registry https://registry.npmmirror.com && npm run build # 设置部署镜像 FROM registry.cn-hangzhou.aliyuncs.com/142vip/nginx:latest diff --git a/nginx.conf b/nginx.conf index d4a5b94..0575c17 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,7 +1,7 @@ # 参考:https://www.likecs.com/ask-1256888.html user root; worker_processes auto; -error_log /var/log/nginx/error.log warn; +error_log /var/log/nginx/error.log error; events { worker_connections 1024; } @@ -9,14 +9,11 @@ http { include /etc/nginx/mime.types; default_type application/octet-stream; sendfile off; - access_log off; + access_log on; keepalive_timeout 3000; server { listen 7000; server_name localhost; - #charset koi8-r; - access_log /var/log/nginx/access.log main; - error_log /var/log/nginx/error.log error; ## 静态资源代理 location / { gzip on; #开启或关闭gzip on off