test_ports.yml 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. volumes:
  2. nginx_conf:
  3. services:
  4. default-80:
  5. image: web
  6. expose:
  7. - "80"
  8. - "81"
  9. environment:
  10. WEB_PORTS: "80 81"
  11. VIRTUAL_HOST: "default-80.nginx-proxy.tld"
  12. default-exposed:
  13. image: web
  14. expose:
  15. - "81"
  16. environment:
  17. WEB_PORTS: "81"
  18. VIRTUAL_HOST: "default-exposed.nginx-proxy.tld"
  19. virtual-port:
  20. image: web
  21. expose:
  22. - "80"
  23. - "90"
  24. environment:
  25. WEB_PORTS: "80 90"
  26. VIRTUAL_HOST: "virtual-port.nginx-proxy.tld"
  27. VIRTUAL_PORT: "90"
  28. wrong-virtual-port:
  29. image: web
  30. expose:
  31. - "81"
  32. environment:
  33. WEB_PORTS: "81"
  34. VIRTUAL_HOST: "wrong-virtual-port.nginx-proxy.tld"
  35. VIRTUAL_PORT: "91"
  36. sut:
  37. profiles:
  38. - singleContainer
  39. image: nginxproxy/nginx-proxy:test
  40. volumes:
  41. - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
  42. sut-dockergen:
  43. profiles:
  44. - separateContainers
  45. image: nginxproxy/nginx-proxy:test-dockergen
  46. volumes:
  47. - &confVolume nginx_conf:/etc/nginx/conf.d
  48. - *dockerSocket
  49. sut-nginx:
  50. profiles:
  51. - separateContainers
  52. container_name: nginx-proxy
  53. image: nginx:alpine
  54. volumes:
  55. - *confVolume
  56. labels:
  57. - "com.github.nginx-proxy.nginx-proxy.nginx"