mirror of
https://github.com/thousmile/molly-multi-tenant.git
synced 2025-12-30 04:32:26 +00:00
1.nginx.conf添加部署方式
This commit is contained in:
@@ -58,7 +58,7 @@ services:
|
||||
- /data/redis7/data:/data
|
||||
- /data/redis7/conf/redis.conf:/etc/redis/redis.conf
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
command: [ "redis-server","/etc/redis/redis.conf" ]
|
||||
command: redis-server --requirepass redis123456 --appendonly yes
|
||||
privileged: true
|
||||
restart: always
|
||||
networks:
|
||||
|
||||
46
nginx.conf
46
nginx.conf
@@ -37,14 +37,17 @@ http {
|
||||
add_header X-Xss-Protection 1;
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name molly.example.com;
|
||||
location / {
|
||||
root /html/platform;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
listen 80;
|
||||
server_name localhost;
|
||||
location / {
|
||||
root /html/tenant;
|
||||
index index.html;
|
||||
}
|
||||
location /platform {
|
||||
alias /html/platform;
|
||||
index index.html;
|
||||
}
|
||||
location /api {
|
||||
rewrite ^/api/(.*)$ /$1 break;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
@@ -54,32 +57,7 @@ http {
|
||||
proxy_set_header Connection "upgrade";
|
||||
# docker 环境下使用 proxy_pass http://molly:18891/;
|
||||
proxy_pass http://127.0.0.1:18891/;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
## 通配符域名。如: hello.molly.example.com 、 test.molly.example.com
|
||||
server_name *.molly.example.com;
|
||||
location / {
|
||||
root /html/tenant;
|
||||
index index.html;
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
rewrite ^/api/(.*)$ /$1 break;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
# docker 环境下使用 proxy_pass http://molly:18891/;
|
||||
proxy_pass http://127.0.0.1:18891/;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -7,4 +7,4 @@ VITE_BASE_API = '/api'
|
||||
VITE_ROUTER_HISTORY = 'hash'
|
||||
|
||||
## 打包路径(就是网站前缀,例如部署到 https://un-pany.github.io/v3-admin-vite/ 域名下,就需要填写 /v3-admin-vite/)
|
||||
VITE_PUBLIC_PATH = '/'
|
||||
VITE_PUBLIC_PATH = '/platform/'
|
||||
|
||||
22
redis.conf
22
redis.conf
@@ -1,22 +0,0 @@
|
||||
#开启远程可连接
|
||||
bind 0.0.0.0
|
||||
#自定义密码
|
||||
#requirepass mht123456
|
||||
#指定 Redis 监听端口(默认:6379)
|
||||
port 6379
|
||||
#客户端闲置指定时长后关闭连接(单位:秒。0:关闭该功能)
|
||||
timeout 0
|
||||
# 900s内如果至少一次写操作则执行bgsave进行RDB持久化操作
|
||||
save 900 1
|
||||
# 在300s内,如果至少有10个key进行了修改,则进行持久化操作
|
||||
save 300 10
|
||||
#在60s内,如果至少有10000个key进行了修改,则进行持久化操作
|
||||
save 60 10000
|
||||
#是否压缩数据存储(默认:yes。Redis采用LZ 压缩,如果为了节省 CPU 时间,可以关闭该选项,但会导致数据库文件变的巨大)
|
||||
rdbcompression yes
|
||||
#指定本地数据文件名(默认:dump.rdb)
|
||||
dbfilename dump.rdb
|
||||
#指定本地数据文件存放目录
|
||||
dir /data
|
||||
#指定日志文件位置(如果是相对路径,redis会将日志存放到指定的dir目录下)
|
||||
logfile /data/redis.log
|
||||
Reference in New Issue
Block a user