|
1年前 | |
---|---|---|
bin | 2 年前 | |
docker | 2 年前 | |
multi-ui | 2 年前 | |
sql | 2 年前 | |
temp | 2 年前 | |
xueyi-api | 1年前 | |
xueyi-auth | 1年前 | |
xueyi-common | 1年前 | |
xueyi-gateway | 1年前 | |
xueyi-modules | 1年前 | |
xueyi-ui | 2 年前 | |
xueyi-visual | 1年前 | |
.gitignore | 2 年前 | |
Jenkinsfile | 2 年前 | |
Jenkinsfile1 | 2 年前 | |
LICENSE | 2 年前 | |
README.md | 2 年前 | |
docker-compose.yml | 1年前 | |
my.cnf | 2 年前 | |
pom.xml | 1年前 | |
scpJar.sh | 2 年前 | |
scpSys.sh | 2 年前 | |
scpSysDocker.sh | 2 年前 | |
sonar-project.properties | 2 年前 | |
tmp | 2 年前 |
基于SpringBoot | Spring Cloud & Alibaba | Mybatis-Plus | Vue3 | vite2 | TypeScript | Ant-Design-Vue UI 的微服务多租户SaaS开发框架,为企业级多租户Saas及集团化应用提供快速开发解决方案。
com.xueyi
├── multi-ui // vue3前端 [3000]
├── xueyi-ui // vue2前端 [80]
├── xueyi-gateway // 网关模块 [8080]
├── xueyi-auth // 认证中心 [9200]
├── xueyi-api // 接口模块
│ ├── xueyi-api-system // 系统接口
│ ├── xueyi-api-tenant // 租户接口
│ └── xueyi-api-job // 调度接口
├── xueyi-common // 通用模块
│ ├── xueyi-common-cache // 缓存管理
│ ├── xueyi-common-core // 核心模块
│ ├── xueyi-common-datascope // 权限范围
│ ├── xueyi-common-datasource // 多数据源
│ ├── xueyi-common-log // 日志记录
│ ├── xueyi-common-redis // 缓存服务
│ ├── xueyi-common-security // 安全模块
│ ├── xueyi-common-swagger // 系统接口
│ └── xueyi-common-web // 租户核心
├── xueyi-modules // 业务模块
│ ├── xueyi-file // 文件服务 [9300]
│ ├── xueyi-gen // 代码生成 [9400]
│ ├── xueyi-job // 定时任务 [9500]
│ ├── xueyi-system // 系统模块 [9600]
│ ├── authority // 权限模块
│ ├── dict // 参数字典
│ ├── material // 素材模块
│ ├── monitor // 监控模块
│ ├── notice // 公告模块
│ └── organize // 组织模块
│ └── xueyi-tenant // 租管模块 [9700]
│ ├── source // 多数据源
│ └── tenant // 租户策略
├── xueyi-visual // 图形化管理模块
│ └── xueyi-visual-monitor // 监控中心 [9100]
└── pom.xml // 公共依赖
git pull http://git.lecooai.com/develop/digimeta-MultiSaas.git
//根模块上执行
mvn package
environment:
MYSQL_ROOT_PASSWORD: Digimeta@123
db.url.0=jdbc:mysql://172.17.0.1:3306/xy-config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user=root
db.password=Digimeta@123
sh ./deploy.sh base
确保mysql能远程访问,不然nacos启动会报错,以下可为远程访问mysql提供参考:
#进入容器里执行,登录mysql
查看:select host,user,plugin from user;
删除多余的行:delete from user where user ='root' and host='%';
设置所有host可以访问:update user set host='%' where user ='root';
修改密码:ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'Digimeta@123';
刷一下,使之生效:FLUSH PRIVILEGES;
退出:exit
sh ./deploy.sh modules
sh ./deploy.sh monitor
代码下执行npm install
然后执行
npm run dev
也可以编译后放在nginx中运行
npm run build:stage
或生产模式编译
npm run build:prod
nginx使用docker部署,nginx相关配置如下:
server {
listen 81;
server_name localhost;
charset utf-8;
gzip on;
# 不压缩临界值,大于1K的才压缩,一般不用改
gzip_min_length 1k;
# 压缩缓冲区
gzip_buffers 16 64K;
# 压缩版本(默认1.1,前端如果是squid2.5请使用1.0)
gzip_http_version 1.1;
# 压缩级别,1-10,数字越大压缩的越好,时间也越长
gzip_comp_level 5;
# 进行压缩的文件类型
gzip_types text/plain application/x-javascript text/css application/xml application/javascript;
# 跟Squid等缓存服务有关,on的话会在Header里增加"Vary: Accept-Encoding"
gzip_vary on;
# IE6对Gzip不怎么友好,不给它Gzip了
gzip_disable "MSIE [1-6]\.";
location / {
# 不缓存html,防止程序更新后缓存继续生效
if ($request_filename ~* .*\.(?:htm|html)$) {
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
access_log on;
}
root /home/vctgo/projects/vctgo-ui/xueyi-ui;
try_files $uri $uri/ /index.html
index index.html index.htm;
}
location /dev-api/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://172.17.0.1:8080/;
proxy_redirect default;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
}
location /stage-api/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://172.17.0.1:8080/;
proxy_redirect default;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
}
location /prod-api/ {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://172.17.0.1:8080/;
proxy_redirect default;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
81端口则为项目的web访问端口