test_load-balancing.yml 997 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. volumes:
  2. nginx_conf:
  3. services:
  4. web1:
  5. image: web
  6. expose:
  7. - "81"
  8. environment:
  9. WEB_PORTS: 81
  10. VIRTUAL_HOST: web.nginx-proxy.tld
  11. web2:
  12. image: web
  13. expose:
  14. - "82"
  15. environment:
  16. WEB_PORTS: 83
  17. VIRTUAL_HOST: web.nginx-proxy.tld
  18. web3:
  19. image: web
  20. expose:
  21. - "83"
  22. environment:
  23. WEB_PORTS: 83
  24. VIRTUAL_HOST: web.nginx-proxy.tld
  25. network_mode: "none"
  26. sut:
  27. profiles:
  28. - singleContainer
  29. image: nginxproxy/nginx-proxy:test
  30. volumes:
  31. - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
  32. sut-dockergen:
  33. profiles:
  34. - separateContainers
  35. image: nginxproxy/nginx-proxy:test-dockergen
  36. volumes:
  37. - &confVolume nginx_conf:/etc/nginx/conf.d
  38. - *dockerSocket
  39. sut-nginx:
  40. profiles:
  41. - separateContainers
  42. container_name: nginx-proxy
  43. image: nginx:alpine
  44. volumes:
  45. - *confVolume
  46. labels:
  47. - "com.github.nginx-proxy.nginx-proxy.nginx"