You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

57 lines
1.4 KiB

version: '3'
services:
# wildfly cluster node-1
wild1:
hostname: wild1
image: shihxuancheng/wildfly-cluster
# container_name: "wild1"
restart: always
networks:
- "wildnetwork"
labels:
- "traefik.backend=wild1"
- "traefik.frontend.rule=PathPrefix:/zkweb"
- "traefik.backend.loadbalancer.method=drr"
# - "traefik.backend.loadbalancer.stickiness=true"
# wildfly cluster node-2
wild2:
hostname: wild2
image: shihxuancheng/wildfly-cluster
# container_name: "wild2"
restart: always
networks:
- "wildnetwork"
labels:
- "traefik.backend=wild1"
- "traefik.frontend.rule=PathPrefix:/zkweb"
- "traefik.backend.loadbalancer.method=drr"
# - "traefik.backend.loadbalancer.stickiness=true"
# frontend lod balance(traefik)
wild-balancer:
image: traefik
hostname: wild-balancer
container_name: "wild-balancer"
command: --web --docker --docker.domain=docker.localhost --logLevel=DEBUG
ports:
- "80:80"
- "9090:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
#- ./traefik.toml:/traefik.toml
networks:
- "wildnetwork"
labels:
- "traefik.frontend.rule=PathPrefix:/zkweb"
- "traefik.enable=false"
networks:
wildnetwork:
driver: bridge
ipam:
driver: default
config:
- subnet: 172.28.0.0/16