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.

36 lines
1.8 KiB

7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
7 years ago
  1. # wflb-docker-demo
  2. Example on how to setup a Wildfly cluster using Docker
  3. <p align="center">
  4. <img src="https://d33wubrfki0l68.cloudfront.net/e29410f43273a18d40e1bd6e41641f5afdfc8057/eb7ca/traefik.logo.png" width="150px"/>
  5. <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Plus_font_awesome.svg/2000px-Plus_font_awesome.svg.png" width="35px"/>
  6. <img src="https://www.shadowandy.net/wp/wp-content/uploads/docker.png" width="250px"/>
  7. <img src="https://upload.wikimedia.org/wikipedia/commons/thumb/c/ce/Plus_font_awesome.svg/2000px-Plus_font_awesome.svg.png" width="35px"/>
  8. <img src="https://ms-vsts.gallerycdn.vsassets.io/extensions/ms-vsts/jboss-wildfly-management-extension/0.112.1/1485289762175/Microsoft.VisualStudio.Services.Icons.Default" width="200px"/>
  9. </p>
  10. <p align="center">
  11. <img src="https://docs.traefik.io/img/architecture.png" width="75%"/>
  12. </p>
  13. ## 建立docker image
  14. ## 如何執行
  15. 1. 透過**docker cli**
  16. 建立private network
  17. ``docker network create --driver=bridge --subnet=172.28.0.0/16 --ip-range=172.28.5.0/24 --gateway=172.28.5.254 wildnetwork``
  18. 執行並執行wildfly docker container
  19. ``docker run -d -p 8081:8080 -p 9991:9990 --name wild1 --network wildnetwork shihxuancheng/wildfly-cluster``
  20. ``docker run -d -p 8082:8080 -p 9992:9990 --name wild2 --network wildnetwork shihxuancheng/wildfly-cluster``
  21. 建立並執行traefik docker container
  22. ``docker run -d -p 8080:8080 -p 80:80 -v $PWD/traefik.toml:/etc/traefik/traefik.toml traefik``
  23. 2. 透過**docker compose**
  24. ```
  25. docker-compose up -d
  26. ```
  27. ## 參考
  28. * [Traefik](https://traefik.io/)
  29. * [Docker](https://www.google.com.tw/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwii842D5NvYAhVDVLwKHSgJA1QQFggmMAA&url=https%3A%2F%2Fwww.docker.com%2F&usg=AOvVaw3p9e1qPvdfjCrUwPYAhUlS)
  30. * [Wildfly](http://wildfly.org/)