test: separate containers (contd)

This commit is contained in:
Nicolas Duchon 2024-12-22 20:50:57 +01:00
parent 5ef2e31687
commit c6987b3ea0
22 changed files with 653 additions and 85 deletions

View file

@ -54,8 +54,7 @@ services:
profiles: profiles:
- separateContainers - separateContainers
image: nginxproxy/nginx-proxy:test-dockergen image: nginxproxy/nginx-proxy:test-dockergen
environment: environment: *nginxProxyEnv
<<: *nginxProxyEnv
volumes: volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d - &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket - *dockerSocket

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
base: base:
image: web image: web
@ -24,10 +28,35 @@ services:
VIRTUAL_HOST: "web1.nginx-proxy.tld" VIRTUAL_HOST: "web1.nginx-proxy.tld"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./cert_selection:/etc/nginx/certs:ro - &certs ./cert_selection:/etc/nginx/certs:ro
- ./acme_root:/usr/share/nginx/html:ro - &acmeRoot ./acme_root:/usr/share/nginx/html:ro
environment: environment: &nginxProxyEnv
DEBUG_ENDPOINT: "true" DEBUG_ENDPOINT: "true"
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
- *acmeRoot
environment: *nginxProxyEnv
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
- *acmeRoot
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web1: web1:
image: web image: web
@ -46,7 +50,29 @@ services:
com.github.nginx-proxy.nginx-proxy.http3.enable: "true" com.github.nginx-proxy.nginx-proxy.http3.enable: "true"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro - &certs ./cert_selection:/etc/nginx/certs:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web1: web1:
image: web image: web
@ -8,11 +12,36 @@ services:
VIRTUAL_HOST: "*.nginx-proxy.tld" VIRTUAL_HOST: "*.nginx-proxy.tld"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro - &certs ./certs:/etc/nginx/certs:ro
- ./acme_root:/usr/share/nginx/html:ro - &acmeRoot ./acme_root:/usr/share/nginx/html:ro
environment: environment: &nginxProxyEnv
HTTP_PORT: 8080 HTTP_PORT: 8080
HTTPS_PORT: 8443 HTTPS_PORT: 8443
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
- *acmeRoot
environment: *nginxProxyEnv
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
- *acmeRoot
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web2: web2:
image: web image: web
@ -9,8 +13,32 @@ services:
HTTPS_METHOD: nohttp HTTPS_METHOD: nohttp
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro - &certs ./certs:/etc/nginx/certs:ro
- ./acme_root:/usr/share/nginx/html:ro - &acmeRoot ./acme_root:/usr/share/nginx/html:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
- *acmeRoot
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
- *acmeRoot
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web: web:
image: web image: web
@ -9,7 +13,29 @@ services:
HTTPS_METHOD: nohttps HTTPS_METHOD: nohttps
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./acme_root:/usr/share/nginx/html:ro - &acmeRoot ./acme_root:/usr/share/nginx/html:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *acmeRoot
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *acmeRoot
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web3: web3:
image: web image: web
@ -9,8 +13,32 @@ services:
HTTPS_METHOD: noredirect HTTPS_METHOD: noredirect
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro - &certs ./certs:/etc/nginx/certs:ro
- ./acme_root:/usr/share/nginx/html:ro - &acmeRoot ./acme_root:/usr/share/nginx/html:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
- *acmeRoot
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
- *acmeRoot
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web1: web1:
image: web image: web
@ -20,8 +24,32 @@ services:
VIRTUAL_DEST: "/" VIRTUAL_DEST: "/"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro - &certs ./certs:/etc/nginx/certs:ro
- ./acme_root:/usr/share/nginx/html:ro - &acmeRoot ./acme_root:/usr/share/nginx/html:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
- *acmeRoot
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
- *acmeRoot
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web1: web1:
image: web image: web
@ -8,8 +12,32 @@ services:
VIRTUAL_HOST: "*.nginx-proxy.tld" VIRTUAL_HOST: "*.nginx-proxy.tld"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro - &certs ./certs:/etc/nginx/certs:ro
- ./acme_root:/usr/share/nginx/html:ro - &acmeRoot ./acme_root:/usr/share/nginx/html:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
- *acmeRoot
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
- *acmeRoot
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web: web:
image: web image: web
@ -9,8 +13,32 @@ services:
HTTPS_METHOD: noredirect HTTPS_METHOD: noredirect
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs/web.nginx-proxy.tld.crt:/etc/nginx/certs/web.nginx-proxy.tld.crt:ro - &certificate ./certs/web.nginx-proxy.tld.crt:/etc/nginx/certs/web.nginx-proxy.tld.crt:ro
- ./certs/web.nginx-proxy.tld.key:/etc/nginx/certs/web.nginx-proxy.tld.key:ro - &privateKey ./certs/web.nginx-proxy.tld.key:/etc/nginx/certs/web.nginx-proxy.tld.key:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certificate
- *privateKey
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certificate
- *privateKey
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web: web:
image: web image: web
@ -9,10 +13,35 @@ services:
HTTPS_METHOD: noredirect HTTPS_METHOD: noredirect
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
environment:
TRUST_DOWNSTREAM_PROXY: "false"
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs/web.nginx-proxy.tld.crt:/etc/nginx/certs/web.nginx-proxy.tld.crt:ro - &certificate ./certs/web.nginx-proxy.tld.crt:/etc/nginx/certs/web.nginx-proxy.tld.crt:ro
- ./certs/web.nginx-proxy.tld.key:/etc/nginx/certs/web.nginx-proxy.tld.key:ro - &privateKey ./certs/web.nginx-proxy.tld.key:/etc/nginx/certs/web.nginx-proxy.tld.key:ro
environment: &nginxProxyEnv
TRUST_DOWNSTREAM_PROXY: "false"
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certificate
- *privateKey
environment: *nginxProxyEnv
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certificate
- *privateKey
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web: web:
image: web image: web
@ -9,10 +13,35 @@ services:
HTTPS_METHOD: noredirect HTTPS_METHOD: noredirect
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
environment:
TRUST_DOWNSTREAM_PROXY: "true"
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs/web.nginx-proxy.tld.crt:/etc/nginx/certs/web.nginx-proxy.tld.crt:ro - &certificate ./certs/web.nginx-proxy.tld.crt:/etc/nginx/certs/web.nginx-proxy.tld.crt:ro
- ./certs/web.nginx-proxy.tld.key:/etc/nginx/certs/web.nginx-proxy.tld.key:ro - &privateKey ./certs/web.nginx-proxy.tld.key:/etc/nginx/certs/web.nginx-proxy.tld.key:ro
environment: &nginxProxyEnv
TRUST_DOWNSTREAM_PROXY: "true"
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certificate
- *privateKey
environment: *nginxProxyEnv
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certificate
- *privateKey
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web: web:
image: web image: web
@ -8,6 +12,26 @@ services:
VIRTUAL_HOST: web.nginx-proxy.tld VIRTUAL_HOST: web.nginx-proxy.tld
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web: web:
image: web image: web
@ -8,8 +12,29 @@ services:
VIRTUAL_HOST: web.nginx-proxy.tld VIRTUAL_HOST: web.nginx-proxy.tld
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
environment: environment: &nginxProxyEnv
SHA1_UPSTREAM_NAME: "true" SHA1_UPSTREAM_NAME: "true"
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
environment: *nginxProxyEnv
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,8 +1,32 @@
volumes:
nginx_conf:
services: services:
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
web1: web1:
image: web image: web

View file

@ -3,13 +3,40 @@ networks:
net2: net2:
net3: net3:
volumes:
nginx_conf:
services: services:
nginx-proxy: nginx-proxy:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
networks: networks: &nginxProxyNetworks
- net1 net1:
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
networks: *nginxProxyNetworks
nginx-proxy-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
web: web:
image: web image: web
@ -19,6 +46,6 @@ services:
WEB_PORTS: 81 WEB_PORTS: 81
VIRTUAL_HOST: web1.nginx-proxy.example VIRTUAL_HOST: web1.nginx-proxy.example
networks: networks:
- net1 net1:
- net2 net2:
- net3 net3:

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
foo: foo:
image: web image: web
@ -37,11 +41,38 @@ services:
VIRTUAL_PATH: "~ ^/(web3|alt)/" VIRTUAL_PATH: "~ ^/(web3|alt)/"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
environment:
DEFAULT_ROOT: 418
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./foo.conf:/etc/nginx/vhost.d/foo.nginx-proxy.test:ro - &fooConf ./foo.conf:/etc/nginx/vhost.d/foo.nginx-proxy.test:ro
- ./bar.conf:/etc/nginx/vhost.d/nginx-proxy.test_918d687a929083edd0c7224ee2293e0e7c062ab4_location:ro - &barConf ./bar.conf:/etc/nginx/vhost.d/nginx-proxy.test_918d687a929083edd0c7224ee2293e0e7c062ab4_location:ro
- ./alternate.conf:/etc/nginx/vhost.d/nginx-proxy.test_7fb22b74bbdf907425dbbad18e4462565cada230_location:ro - &alternateConf ./alternate.conf:/etc/nginx/vhost.d/nginx-proxy.test_7fb22b74bbdf907425dbbad18e4462565cada230_location:ro
environment: &nginxProxyEnv
DEFAULT_ROOT: 418
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *fooConf
- *barConf
- *alternateConf
environment: *nginxProxyEnv
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *fooConf
- *barConf
- *alternateConf
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,11 +1,36 @@
volumes:
nginx_conf:
services: services:
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
environment: environment: &nginxProxyEnv
DEFAULT_ROOT: none DEFAULT_ROOT: none
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
environment: *nginxProxyEnv
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
web: web:
image: web image: web
expose: expose:

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web1: web1:
image: web image: web
@ -10,9 +14,32 @@ services:
VIRTUAL_DEST: "/" VIRTUAL_DEST: "/"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs:ro - &certs ./certs:/etc/nginx/certs:ro
environment: environment: &nginxProxyEnv
- DEFAULT_ROOT=301 http://$$host/web1$$request_uri DEFAULT_ROOT: "301 http://$$host/web1$$request_uri"
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
environment: *nginxProxyEnv
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web1: web1:
image: web image: web
@ -30,9 +34,35 @@ services:
VIRTUAL_DEST: "/" VIRTUAL_DEST: "/"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- ./default.conf:/etc/nginx/vhost.d/default_location:ro - &defaultConf ./default.conf:/etc/nginx/vhost.d/default_location:ro
- ./host.conf:/etc/nginx/vhost.d/bar.nginx-proxy.test_location:ro - &hostConf ./host.conf:/etc/nginx/vhost.d/bar.nginx-proxy.test_location:ro
- ./path.conf:/etc/nginx/vhost.d/bar.nginx-proxy.test_99f2db0ed8aa95dbb5b87fca79c7eff2ff6bb8bd_location:ro - &pathConf ./path.conf:/etc/nginx/vhost.d/bar.nginx-proxy.test_99f2db0ed8aa95dbb5b87fca79c7eff2ff6bb8bd_location:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *defaultConf
- *hostConf
- *pathConf
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *defaultConf
- *hostConf
- *pathConf
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
foo: foo:
image: web image: web
@ -37,6 +41,26 @@ services:
VIRTUAL_PATH: "/" VIRTUAL_PATH: "/"
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services: services:
web1: web1:
image: web image: web
@ -32,6 +36,26 @@ services:
VIRTUAL_HOST: ~^web4\..*\.nginx-proxy\.regexp$$ # we need to double the `$` because of docker compose variable interpolation VIRTUAL_HOST: ~^web4\..*\.nginx-proxy\.regexp$$ # we need to double the `$` because of docker compose variable interpolation
sut: sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"