docker swarm

This commit is contained in:
marsal
2024-06-05 13:13:44 +08:00
parent d6dca2b585
commit 70f90c1d03
8912 changed files with 1269849 additions and 560260 deletions

View File

@ -6,18 +6,19 @@ networks:
external: true
services:
server:
image: 'xuxueli/xxl-job-admin:2.2.0'
image: 'xuxueli/xxl-job-admin:2.4.1'
hostname: ${NAMESPACE}-xxl-job-admin
ports:
- '${NODE_PORT}:8080'
environment:
- TZ=Asia/Shanghai
- PARAMS=--spring.datasource.url=jdbc:mysql://${DATASOURCE_URL}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai --spring.datasource.username=${DATASOURCE_USERNAME} --spring.datasource.password=${DATASOURCE_PASSWORD}
- PARAMS=--xxl.job.logretentiondays=90 --xxl.job.accessToken= --spring.datasource.url=jdbc:mysql://${DATASOURCE_URL}?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&serverTimezone=Asia/Shanghai --spring.datasource.username=${DATASOURCE_USERNAME} --spring.datasource.password=${DATASOURCE_PASSWORD}
deploy:
mode: replicated
replicas: ${REPLICAS}
update_config:
order: start-first
placement:
constraints:
- node.labels.${NAMESPACE}_xxl_job_admin==1
- node.labels.xxl_job_admin==1
max_replicas_per_node: 1