first commit
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
version: "3.5"
|
||||
|
||||
services:
|
||||
client-ui:
|
||||
image: nginx:latest
|
||||
container_name: client-ui
|
||||
volumes:
|
||||
- ./dist:/usr/share/nginx/html:ro
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
|
||||
environment:
|
||||
TZ: "Asia/Shanghai"
|
||||
ports:
|
||||
- 8665:80
|
||||
logging:
|
||||
driver: "json-file"
|
||||
options:
|
||||
max-size: "10240k"
|
||||
max-file: "10"
|
||||
network_mode: "bridge"
|
||||
command: /bin/bash -c "nginx -g 'daemon off;'"
|
||||
restart: always
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
charset utf-8;
|
||||
server_tokens off;
|
||||
|
||||
gzip on;
|
||||
gzip_min_length 1k;
|
||||
gzip_comp_level 9;
|
||||
gzip_types text/plain text/css text/javascript application/json application/javascript application/x-javascript application/xml;
|
||||
gzip_vary on;
|
||||
gzip_disable "MSIE [1-6]\.";
|
||||
|
||||
upstream go.api {
|
||||
server 192.168.0.118:8666;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80 default;
|
||||
server_tokens off;
|
||||
|
||||
location /api {
|
||||
proxy_pass http://go.api;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
||||
rewrite ^/api/(.*)$ /$1 break;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user