fix: 码全代码添加
This commit is contained in:
2
template/cvbp/dockerfile/wrapper/Dockerfile
Normal file
2
template/cvbp/dockerfile/wrapper/Dockerfile
Normal file
@@ -0,0 +1,2 @@
|
||||
FROM nginx:latest
|
||||
COPY default.conf /etc/nginx/conf.d/default.conf
|
||||
62
template/cvbp/dockerfile/wrapper/default.conf
Normal file
62
template/cvbp/dockerfile/wrapper/default.conf
Normal file
@@ -0,0 +1,62 @@
|
||||
upstream pc-proxy {
|
||||
server pc:80;
|
||||
}
|
||||
|
||||
upstream mobile-proxy {
|
||||
server mobile:80;
|
||||
}
|
||||
|
||||
upstream backend-api {
|
||||
server backend:8089;
|
||||
}
|
||||
server {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
absolute_redirect off;
|
||||
|
||||
charset utf-8;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 5;
|
||||
gzip_types application/javascript application/x-javascript text/javascript text/css image/jpeg image/gif image/png;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
gzip_vary on;
|
||||
|
||||
location /web/ {
|
||||
proxy_pass http://pc-proxy/web/;
|
||||
}
|
||||
|
||||
location /app/ {
|
||||
proxy_pass http://mobile-proxy/app/;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
add_header Access-Control-Allow-Credentials true;
|
||||
add_header Access-Control-Allow-Origin $http_origin;
|
||||
add_header Access-Control-Allow-Headers *;
|
||||
add_header Access-Control-Allow-Methods *;
|
||||
proxy_http_version 1.1;
|
||||
proxy_read_timeout 7200;
|
||||
client_max_body_size 200m;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-HOST $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_pass http://backend-api/;
|
||||
}
|
||||
|
||||
location /files/ {
|
||||
alias /data/files/;
|
||||
}
|
||||
|
||||
location /manager/sysFile/download/ {
|
||||
alias /data/files/;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user