test_proxy-host-network-mode.yml 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. volumes:
  2. nginx_conf:
  3. services:
  4. host-network-1:
  5. image: web
  6. environment:
  7. WEB_PORTS: "8080"
  8. VIRTUAL_HOST: "host-network-1.nginx-proxy.tld"
  9. VIRTUAL_PORT: "8080"
  10. network_mode: host
  11. host-network-2:
  12. image: web
  13. environment:
  14. WEB_PORTS: "8181"
  15. VIRTUAL_HOST: "host-network-2.nginx-proxy.tld"
  16. VIRTUAL_PORT: "8181"
  17. network_mode: host
  18. sut:
  19. profiles:
  20. - singleContainer
  21. image: nginxproxy/nginx-proxy:test
  22. volumes:
  23. - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
  24. environment: &nginxProxyEnv
  25. HTTP_PORT: 8888
  26. network_mode: host
  27. sut-dockergen:
  28. profiles:
  29. - separateContainers
  30. image: nginxproxy/nginx-proxy:test-dockergen
  31. volumes:
  32. - &confVolume nginx_conf:/etc/nginx/conf.d
  33. - *dockerSocket
  34. environment: *nginxProxyEnv
  35. sut-nginx:
  36. profiles:
  37. - separateContainers
  38. container_name: nginx-proxy
  39. image: nginx:alpine
  40. volumes:
  41. - *confVolume
  42. labels:
  43. - "com.github.nginx-proxy.nginx-proxy.nginx"