test_virtual_paths.yml 1.3 KB

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