xxl-job-executor2.2.0添加为默认执行器(docker方式)

环境:centos7、xxl-job2.2.0

1、下载xxl-job-executor执行器images、配置文件、执行文件

链接: https://pan.baidu.com/s/1lEyZr7pd06pnmdIUkbEouQ 提取码: iujb

2、还原images

docker load -i xxl-job-executor.tar

3、修改配置文件 application.properties

# web port
server.port=8081
# no web
#spring.main.web-environment=false

# log config
logging.config=classpath:logback.xml


### xxl-job admin address list, such as "http://address" or "http://address01,http://address02"
xxl.job.admin.addresses=http://100.98.100.234:31748/xxl-job-admin

### xxl-job, access token
xxl.job.accessToken=

### xxl-job executor appname(这儿的appname就是页面注册时填的第一个appname)
xxl.job.executor.appname=xxl-job-executor-sample
### xxl-job executor registry-address: default use address to registry , otherwise use ip:port if address is null
xxl.job.executor.address=
### xxl-job executor server-info
xxl.job.executor.ip=100.98.100.234    
xxl.job.executor.port=9999
### xxl-job executor log-path
xxl.job.executor.logpath=/data/applogs/xxl-job/jobhandler
### xxl-job executor log-retention-days
xxl.job.executor.logretentiondays=30

4、运行容器查看执行器注册

[root@host-172-21-210-10 prod-xxl-job]# more zxfb.sh 
docker run -p 18081:8081 -p 9999:9999 \
-v /wj/prod-xxl-job/application.properties:/application.properties \
--name xxl-job-executor-sample-springboot  -d kobedocker24/xxl-job-executor-sample-springboot:2.2.0

启动前(新增执行器,注意appname,选择自动注册方式)

 

 启动后

 

posted @ 2020-09-23 16:57  苍茫宇宙  阅读(1521)  评论(0编辑  收藏  举报