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

  1. version: '3'
  2. services:
  3. # wildfly cluster node-1
  4. wild1:
  5. hostname: wild1
  6. image: shihxuancheng/wildfly-cluster
  7. # container_name: "wild1"
  8. restart: always
  9. networks:
  10. - "wildnetwork"
  11. labels:
  12. - "traefik.backend=wild1"
  13. - "traefik.frontend.rule=PathPrefix:/zkweb"
  14. - "traefik.backend.loadbalancer.method=drr"
  15. # - "traefik.backend.loadbalancer.stickiness=true"
  16. # wildfly cluster node-2
  17. wild2:
  18. hostname: wild2
  19. image: shihxuancheng/wildfly-cluster
  20. # container_name: "wild2"
  21. restart: always
  22. networks:
  23. - "wildnetwork"
  24. labels:
  25. - "traefik.backend=wild1"
  26. - "traefik.frontend.rule=PathPrefix:/zkweb"
  27. - "traefik.backend.loadbalancer.method=drr"
  28. # - "traefik.backend.loadbalancer.stickiness=true"
  29. # frontend lod balance(traefik)
  30. wild-balancer:
  31. image: traefik
  32. hostname: wild-balancer
  33. container_name: "wild-balancer"
  34. command: --web --docker --docker.domain=docker.localhost --logLevel=DEBUG
  35. ports:
  36. - "80:80"
  37. - "9090:8080"
  38. volumes:
  39. - /var/run/docker.sock:/var/run/docker.sock
  40. #- ./traefik.toml:/traefik.toml
  41. networks:
  42. - "wildnetwork"
  43. labels:
  44. - "traefik.frontend.rule=PathPrefix:/zkweb"
  45. - "traefik.enable=false"
  46. networks:
  47. wildnetwork:
  48. driver: bridge
  49. ipam:
  50. driver: default
  51. config:
  52. - subnet: 172.28.0.0/16