test_proxy-host-network-mode.yml 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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:
  35. <<: *nginxProxyEnv
  36. sut-nginx:
  37. profiles:
  38. - separateContainers
  39. container_name: nginx-proxy
  40. image: nginx:alpine
  41. volumes:
  42. - *confVolume
  43. labels:
  44. - "com.github.nginx-proxy.nginx-proxy.nginx"