test_htpasswd_virtual_path.yml 884 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. volumes:
  2. nginx_conf:
  3. services:
  4. web:
  5. image: web
  6. expose:
  7. - "80"
  8. environment:
  9. WEB_PORTS: 80
  10. VIRTUAL_HOST: htpasswd.nginx-proxy.tld
  11. VIRTUAL_PATH: /foo/
  12. VIRTUAL_DEST: /
  13. sut:
  14. profiles:
  15. - singleContainer
  16. container_name: sut
  17. image: nginxproxy/nginx-proxy:test
  18. volumes:
  19. - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
  20. - &htpasswd ./htpasswd:/etc/nginx/htpasswd:ro
  21. sut-dockergen:
  22. profiles:
  23. - separateContainers
  24. image: nginxproxy/nginx-proxy:test-dockergen
  25. volumes:
  26. - &confVolume nginx_conf:/etc/nginx/conf.d
  27. - *dockerSocket
  28. - *htpasswd
  29. sut-nginx:
  30. profiles:
  31. - separateContainers
  32. container_name: nginx-proxy
  33. image: nginx:alpine
  34. volumes:
  35. - *confVolume
  36. - *htpasswd
  37. labels:
  38. - "com.github.nginx-proxy.nginx-proxy.nginx"