test_virtual_path.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. volumes:
  2. nginx_conf:
  3. services:
  4. web1:
  5. image: web
  6. expose:
  7. - "81"
  8. environment:
  9. WEB_PORTS: "81"
  10. VIRTUAL_HOST: "www.nginx-proxy.tld"
  11. VIRTUAL_PATH: "/web1/"
  12. VIRTUAL_DEST: "/"
  13. web2:
  14. image: web
  15. expose:
  16. - "82"
  17. environment:
  18. WEB_PORTS: "82"
  19. VIRTUAL_HOST: "www.nginx-proxy.tld"
  20. VIRTUAL_PATH: "/web2/"
  21. VIRTUAL_DEST: "/"
  22. sut:
  23. profiles:
  24. - singleContainer
  25. image: nginxproxy/nginx-proxy:test
  26. volumes:
  27. - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
  28. - &certs ./certs:/etc/nginx/certs:ro
  29. - &acmeRoot ./acme_root:/usr/share/nginx/html:ro
  30. sut-dockergen:
  31. profiles:
  32. - separateContainers
  33. image: nginxproxy/nginx-proxy:test-dockergen
  34. volumes:
  35. - &confVolume nginx_conf:/etc/nginx/conf.d
  36. - *dockerSocket
  37. - *certs
  38. - *acmeRoot
  39. sut-nginx:
  40. profiles:
  41. - separateContainers
  42. container_name: nginx-proxy
  43. image: nginx:alpine
  44. volumes:
  45. - *confVolume
  46. - *certs
  47. - *acmeRoot
  48. labels:
  49. - "com.github.nginx-proxy.nginx-proxy.nginx"