From 180402b09ea74c4e8a8890b38aebeb206db3cc6e Mon Sep 17 00:00:00 2001 From: anonymous Date: Thu, 21 Mar 2024 01:45:25 +0800 Subject: [PATCH] save --- Dockerfile2 | 2 ++ Dockerfile3 | 2 ++ docker/pc.conf | 29 +++++++++++++++++++++++++++++ package.json | 2 +- 4 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 docker/pc.conf diff --git a/Dockerfile2 b/Dockerfile2 index c2f1226..d6824c5 100644 --- a/Dockerfile2 +++ b/Dockerfile2 @@ -1,4 +1,6 @@ FROM markliu2018/moneynote-all:latest + +COPY ./docker/pc.conf /etc/nginx/sites-available/pc.conf COPY ./dist/ /var/www/pc WORKDIR /app diff --git a/Dockerfile3 b/Dockerfile3 index b887db6..ceeb3b2 100644 --- a/Dockerfile3 +++ b/Dockerfile3 @@ -1,4 +1,6 @@ FROM markliu2018/moneynote-all-no-mysql:latest + +COPY ./docker/pc.conf /etc/nginx/sites-available/pc.conf COPY ./dist/ /var/www/pc WORKDIR /app diff --git a/docker/pc.conf b/docker/pc.conf new file mode 100644 index 0000000..5fc70af --- /dev/null +++ b/docker/pc.conf @@ -0,0 +1,29 @@ +server { + + listen 81; + listen [::]:81; + server_name localhost; + root /var/www/pc; + index index.html index.htm; + + client_max_body_size 50M; //文件大小限制,默认1m + client_header_timeout 1m; + client_body_timeout 1m; + proxy_connect_timeout 60s; + proxy_read_timeout 1m; + proxy_send_timeout 1m; + + location / { + try_files $uri $uri/ /index.html; + } + + location ~ ^/api/v1 { + proxy_pass http://127.0.0.1:9092; + proxy_http_version 1.1; + proxy_set_header Host $http_host; + proxy_set_header Cookie $http_cookie; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} \ No newline at end of file diff --git a/package.json b/package.json index 0c9fe5d..c5fe326 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "moneynote-pc", - "version": "1.0.81", + "version": "1.0.82", "private": true, "scripts": { "analyze": "cross-env ANALYZE=1 max build",