代码网址 https://gitee.com/xuxueli0323/xxl-job/tree/2.3.0
可以看到代码中的sql版本也是2.3.1
注意:这里的 networksname: xph_network。mysql,redis都在同一个network下
- version: '3'
- services:
- xxl-job:
- restart: always
- container_name: xxl-job
- image: xuxueli/xxl-job-admin:2.3.1
- ports:
- - 18080:8080
- environment:
- PARAMS: "--spring.datasource.url=jdbc:mysql://XXX.XXX.XXX.XXX:3306/xxl_job?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai --spring.datasource.username=root --spring.datasource.password=xph87510227"
- volumes:
- - /mnt/docker/XXL-JOB/logs/:/data/applogs/xxl-job/
- deploy:
- resources:
- limits:
- memory: 500M
- reservations:
- memory: 30M
- networks:
- default:
- external:
- name: xph-network
指令 | 说明 |
cd /mnt/docker/XXL-JOB/ | 进入目录 /mnt/docker/XXL-JOB/ |
docker-compose --compatibility up -d | 安装 xxl-job-admin |
docker logs -f -t --tail 1000 xxl-job | 查看(实时)容器最新1000行大于信息 |
docker network inspect xph_network | 查看network详情,包含所有容器的信息,如ip |
docker network ls | 查看network列表 |
docker-compose --compatibility up -d --build | 重构镜像 |