test: separate containers (contd)

This commit is contained in:
Nicolas Duchon 2024-12-19 01:35:50 +01:00
parent 19200326a3
commit 1430f9fbff
13 changed files with 379 additions and 25 deletions

View file

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

View file

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

View file

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

View file

@ -1,3 +1,7 @@
volumes:
nginx_conf:
services:
http2-global-disabled:
image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: http2-global-disabled.nginx-proxy.tld
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
environment: &nginxProxyEnv
ENABLE_HTTP2: "false"
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,3 +1,7 @@
volumes:
nginx_conf:
services:
http3-global-disabled:
image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: http3-global-disabled.nginx-proxy.tld
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
#environment:
#ENABLE_HTTP3: "false" #Disabled by default
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
#environment:
#ENABLE_HTTP3: "false" #Disabled by default
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:
http3-global-enabled:
image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: http3-global-enabled.nginx-proxy.tld
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
environment: &nginxProxyEnv
ENABLE_HTTP3: "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,3 +1,7 @@
volumes:
nginx_conf:
services:
http3-vhost-enabled:
image: web
@ -28,6 +32,26 @@ services:
VIRTUAL_HOST: http3-vhost-default-disabled.nginx-proxy.tld
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
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:
web1:
image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: "*.nginx-proxy.tld"
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
environment: &nginxProxyEnv
HTTP_PORT: 8080
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,3 +1,7 @@
volumes:
nginx_conf:
services:
web1:
image: web
@ -17,7 +21,29 @@ services:
VIRTUAL_HOST: web2.nginx-proxy.example
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./network_internal.conf:/etc/nginx/network_internal.conf:ro
- &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
- &networkInternal ./network_internal.conf:/etc/nginx/network_internal.conf:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *networkInternal
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *networkInternal
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

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

View file

@ -5,6 +5,10 @@ networks:
config:
- subnet: fd00:1::/80
volumes:
nginx_conf:
services:
web1:
image: web
@ -27,10 +31,36 @@ services:
- net1
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
environment: &nginxProxyEnv
ENABLE_IPV6: "true"
networks:
- net1
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
environment:
<<: *nginxProxyEnv
networks:
- net1
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
networks:
- net1

View file

@ -10,6 +10,10 @@ networks:
- subnet: 172.16.20.0/24
- subnet: fd00:cafe:face:feed::/64
volumes:
nginx_conf:
services:
ipv4only:
image: web
@ -32,12 +36,40 @@ services:
ipv6_address: fd00:cafe:face:feed::2
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
networks: &nginxProxyNetworks
ipv4net:
ipv4_address: 172.16.10.3
dualstacknet:
ipv4_address: 172.16.20.3
ipv6_address: fd00:cafe:face:feed::3
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
networks:
<<: *nginxProxyNetworks
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
networks:
ipv4net:
ipv4_address: 172.16.10.4
dualstacknet:
ipv4_address: 172.16.20.4
ipv6_address: fd00:cafe:face:feed::4

View file

@ -10,6 +10,10 @@ networks:
- subnet: 172.16.20.0/24
- subnet: fd00:cafe:face:feed::/64
volumes:
nginx_conf:
services:
ipv4only:
image: web
@ -32,14 +36,44 @@ services:
ipv6_address: fd00:cafe:face:feed::2
sut:
profiles:
- singleContainer
image: nginxproxy/nginx-proxy:test
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
environment:
- &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
environment: &nginxProxyEnv
PREFER_IPV6_NETWORK: "true"
networks:
networks: &nginxProxyNetworks
ipv4net:
ipv4_address: 172.16.10.3
dualstacknet:
ipv4_address: 172.16.20.3
ipv6_address: fd00:cafe:face:feed::3
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
environment:
<<: *nginxProxyEnv
networks:
<<: *nginxProxyNetworks
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
networks:
ipv4net:
ipv4_address: 172.16.10.4
dualstacknet:
ipv4_address: 172.16.20.4
ipv6_address: fd00:cafe:face:feed::4