test_location-override.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. volumes:
  2. nginx_conf:
  3. services:
  4. sut:
  5. profiles:
  6. - singleContainer
  7. image: nginxproxy/nginx-proxy:test
  8. volumes:
  9. - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
  10. - &locationOverride ./test_location-override.vhost.d:/etc/nginx/vhost.d:ro
  11. sut-dockergen:
  12. profiles:
  13. - separateContainers
  14. image: nginxproxy/nginx-proxy:test-dockergen
  15. volumes:
  16. - &confVolume nginx_conf:/etc/nginx/conf.d
  17. - *dockerSocket
  18. - *locationOverride
  19. sut-nginx:
  20. profiles:
  21. - separateContainers
  22. container_name: nginx-proxy
  23. image: nginx:alpine
  24. volumes:
  25. - *confVolume
  26. - *locationOverride
  27. labels:
  28. - "com.github.nginx-proxy.nginx-proxy.nginx"
  29. explicit-root:
  30. image: web
  31. expose:
  32. - "81"
  33. environment:
  34. WEB_PORTS: "81"
  35. VIRTUAL_HOST: >-
  36. explicit-root-nohash.nginx-proxy.test,
  37. explicit-root-hash.nginx-proxy.test,
  38. explicit-root-hash-and-nohash.nginx-proxy.test,
  39. explicit-nonroot.nginx-proxy.test
  40. VIRTUAL_PATH: /
  41. explicit-foo:
  42. image: web
  43. expose:
  44. - "82"
  45. environment:
  46. WEB_PORTS: "82"
  47. VIRTUAL_HOST: >-
  48. explicit-root-nohash.nginx-proxy.test,
  49. explicit-root-hash.nginx-proxy.test,
  50. explicit-root-hash-and-nohash.nginx-proxy.test,
  51. explicit-nonroot.nginx-proxy.test
  52. VIRTUAL_PATH: /foo/
  53. VIRTUAL_DEST: /
  54. # Same as explicit-root except VIRTUAL_PATH is left unset.
  55. implicit-root:
  56. image: web
  57. expose:
  58. - "83"
  59. environment:
  60. WEB_PORTS: "83"
  61. VIRTUAL_HOST: >-
  62. implicit-root-nohash.nginx-proxy.test,
  63. implicit-root-hash.nginx-proxy.test,
  64. implicit-root-hash-and-nohash.nginx-proxy.test,