mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-12-26 01:55:59 +08:00
!359 [需求认领] 对接 powerjob 实现分布式任务调度 集成方式参考框架内 xxl-job
* 对接powerjob替换xxl-job实现分布式任务调度
This commit is contained in:
@@ -141,14 +141,20 @@ services:
|
||||
privileged: true
|
||||
network_mode: "host"
|
||||
|
||||
ruoyi-xxl-job-admin:
|
||||
image: ruoyi/ruoyi-xxl-job-admin:5.0.0
|
||||
container_name: ruoyi-xxl-job-admin
|
||||
ruoyi-powerjob-server:
|
||||
image: powerjob/powerjob-server:latest
|
||||
restart: always
|
||||
depends_on:
|
||||
- mysql
|
||||
environment:
|
||||
# 时区上海
|
||||
TZ: Asia/Shanghai
|
||||
JVMOPTIONS: "-Xmx512m"
|
||||
PARAMS: "--oms.mongodb.enable=false --spring.datasource.core.jdbc-url=jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai --spring.datasource.core.username=root --spring.datasource.core.password=root --oms.table-prefix=pj_"
|
||||
ports:
|
||||
- "7700:7700"
|
||||
- "10086:10086"
|
||||
- "10010:10010"
|
||||
volumes:
|
||||
# 配置文件
|
||||
- /docker/xxljob/logs/:/ruoyi/xxljob/logs
|
||||
- /docker/powerjob-data/powerjob-server:/root/powerjob/server/
|
||||
privileged: true
|
||||
network_mode: "host"
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ http {
|
||||
server 127.0.0.1:9090;
|
||||
}
|
||||
|
||||
upstream xxljob-admin {
|
||||
server 127.0.0.1:9100;
|
||||
upstream powerjob {
|
||||
server 127.0.0.1:7700;
|
||||
}
|
||||
|
||||
server {
|
||||
@@ -93,14 +93,14 @@ http {
|
||||
}
|
||||
|
||||
# https 会拦截内链所有的 http 请求 造成功能无法使用
|
||||
# 解决方案1 将 xxljob 服务 也配置成 https
|
||||
# 解决方案1 将 powerjob 服务 也配置成 https
|
||||
# 解决方案2 将菜单配置为外链访问 走独立页面 http 访问
|
||||
location /xxl-job-admin/ {
|
||||
location /powerjob/ {
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header REMOTE-HOST $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_pass http://xxljob-admin/xxl-job-admin/;
|
||||
proxy_pass http://powerjob/;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
|
||||
Reference in New Issue
Block a user