我想在Docker Swarm上添加粘性会话,我首先开始部署后端和traefik容器,但是traefik仪表板没有显示任何提供程序
loadbalancer:
image: registry.fif.tech/traefik:latest
command: --docker \
--docker.swarmmode \
--docker.watch \
--docker.exposedbydefault=false \
--web \
--entryPoints="Name:http Address::8001" \
--defaultentrypoints="http" \
--checknewversion=false \
--loglevel=DEBUG
ports:
- 8001:8001
- 9090:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
deploy:
restart_policy:
condition: any
mode: replicated
replicas: 1
update_config:
delay: 2s
placement:
constraints: [node.role == manager]
networks:
- omni-net
web-desktop:
image: 'registry.fif.tech/omnichannel2-webdesktop:${TAG}'
command: dockerize -wait http://172.17.0.1:4001/ora-cmm-workflow-executor/PreProcessService?wsdl catalina.sh run
restart: always
deploy:
mode: replicated
replicas: 2
update_config:
parallelism: 1
delay: 10s
failure_action: continue
order: start-first
restart_policy:
condition: on-failure
delay: 5s
max_attempts: 3
window: 120s
ports:
- '9999:8080'
environment:
- TZ='${TZ}'
extra_hosts:
- "webdesktop:127.0.0.1"
- "cmm-server-jms:${CMM_JMS_SERVER_IP}"
- "techlog-server-jms:${TECHLOG_JMS_SERVER_IP}"
depends_on:
- "workflow"
- "redis-server"
secrets:
- DBMetadata
- DBSecuencial
- Desktop
- DesktopRedis
- DesktopKey
volumes:
- /logs-pool/tomcat:/cyberbank/logs
configs:
- source: recaptcha_config
target: /cyberbank/ebanking/v2/config/recaptcha.properties
logging:
driver: none
healthcheck:
test: ["CMD-SHELL", "curl --silent --fail http://localhost:8080/Techbank/sso || exit 1"]
interval: 30s
timeout: 2s
retries: 26
start_period: 2m
labels:
- "traefik.enable=true"
- "traefik.docker.network=omnichannel2_omni-net"
- "traefik.port=9999"
- "traefik.frontend.rule=PathPrefix:/Techbank;"
- "traefik.backend.loadbalancer.sticky=true"
networks:
- omni-net
堆栈定义有问题吗?