2
0

test_custom_conf.yml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. volumes:
  2. nginx_conf:
  3. services:
  4. foo:
  5. image: web
  6. expose:
  7. - "42"
  8. environment:
  9. WEB_PORTS: "42"
  10. VIRTUAL_HOST: "foo.nginx-proxy.test"
  11. web1:
  12. image: web
  13. expose:
  14. - "81"
  15. environment:
  16. WEB_PORTS: "81"
  17. VIRTUAL_HOST: "nginx-proxy.test"
  18. VIRTUAL_PATH: "/web1/"
  19. VIRTUAL_DEST: "/"
  20. web2:
  21. image: web
  22. expose:
  23. - "82"
  24. environment:
  25. WEB_PORTS: "82"
  26. VIRTUAL_HOST: "nginx-proxy.test"
  27. VIRTUAL_PATH: "/web2/"
  28. VIRTUAL_DEST: "/"
  29. web3:
  30. image: web
  31. expose:
  32. - "83"
  33. environment:
  34. WEB_PORTS: "83"
  35. VIRTUAL_HOST: "nginx-proxy.test"
  36. VIRTUAL_PATH: "~ ^/(web3|alt)/"
  37. sut:
  38. profiles:
  39. - singleContainer
  40. image: nginxproxy/nginx-proxy:test
  41. volumes:
  42. - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
  43. - &fooConf ./foo.conf:/etc/nginx/vhost.d/foo.nginx-proxy.test:ro
  44. - &barConf ./bar.conf:/etc/nginx/vhost.d/nginx-proxy.test_918d687a929083edd0c7224ee2293e0e7c062ab4_location:ro
  45. - &alternateConf ./alternate.conf:/etc/nginx/vhost.d/nginx-proxy.test_7fb22b74bbdf907425dbbad18e4462565cada230_location:ro
  46. environment: &nginxProxyEnv
  47. DEFAULT_ROOT: 418
  48. sut-dockergen:
  49. profiles:
  50. - separateContainers
  51. image: nginxproxy/nginx-proxy:test-dockergen
  52. volumes:
  53. - &confVolume nginx_conf:/etc/nginx/conf.d
  54. - *dockerSocket
  55. - *fooConf
  56. - *barConf
  57. - *alternateConf
  58. environment: *nginxProxyEnv
  59. sut-nginx:
  60. profiles:
  61. - separateContainers
  62. container_name: nginx-proxy
  63. image: nginx:alpine
  64. volumes:
  65. - *confVolume
  66. - *fooConf
  67. - *barConf
  68. - *alternateConf
  69. labels:
  70. - "com.github.nginx-proxy.nginx-proxy.nginx"