xxl-job配置

1.查找本地ip


ifconfig | grep 192

2.修改

vi /data/www/docker-compose.yml 替换ip,否则无法连接数据库

version: '3'

services:

  xxljob:

    image: docker.io/xuxueli/xxl-job-admin:2.1.1

    container_name: xxljob

    volumes:

      - /var/log/xxl-job:/data/applogs

    ports:

      - 8001:8080

    environment:

      TZ: Asia/Shanghai

      PARAMS: '--spring.datasource.url=jdbc:mysql://10.66.151.95:3306/xxl_job?Unicode=true&characterEncoding=UTF-8 --spring.datasource.username=xxl_job --spring.datasource.password=xxx--spring.mail.host=smtp.163.com [email protected] --spring.mail.password=xxxxx --xxl.job.login.username=admin --xxl.job.login.password=xxxx'

    networks:

      - default

    logging:

      driver: "json-file"

      options:

        max-size: "200k"

        max-file: "10"

networks:

  default:

3.执行

cd /data/www/ && docker-compose up -d

4.执行

nohup java -jar /home/deepin/xxl-job/xxl-job/xxl-job-executor-sample-springboot-2.1.0.jar --xxl.job.admin.addresses=http://192.168.31.69:8001/xxl-job-admin --xxl.job.executor.logpath=logs/xxl-job/jobhandler --xxl.job.executor.ip=192.168.31.69

这里配置的地址,要跟后台地址保持一致

5.访问 http://127.0.0.1:8001/xxl-job-admin/toLogin

6.修改

你可能感兴趣的:(xxl-job配置)