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: services:
regex: regex:
image: web image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: ~^regex.*\.nginx-proxy\.example$ VIRTUAL_HOST: ~^regex.*\.nginx-proxy\.example$
sut: sut:
profiles:
- singleContainer
container_name: sut container_name: sut
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
- ./htpasswd:/etc/nginx/htpasswd: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: services:
web: web:
image: web image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: htpasswd.nginx-proxy.tld VIRTUAL_HOST: htpasswd.nginx-proxy.tld
sut: sut:
profiles:
- singleContainer
container_name: sut container_name: sut
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
- ./htpasswd:/etc/nginx/htpasswd: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: services:
web: web:
image: web image: web
@ -10,8 +14,30 @@ services:
VIRTUAL_DEST: / VIRTUAL_DEST: /
sut: sut:
profiles:
- singleContainer
container_name: sut container_name: sut
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
- ./htpasswd:/etc/nginx/htpasswd: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: services:
http2-global-disabled: http2-global-disabled:
image: web image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: http2-global-disabled.nginx-proxy.tld VIRTUAL_HOST: http2-global-disabled.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
ENABLE_HTTP2: "false" 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: services:
http3-global-disabled: http3-global-disabled:
image: web image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: http3-global-disabled.nginx-proxy.tld VIRTUAL_HOST: http3-global-disabled.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:
#ENABLE_HTTP3: "false" #Disabled by default #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: services:
http3-global-enabled: http3-global-enabled:
image: web image: web
@ -8,8 +12,30 @@ services:
VIRTUAL_HOST: http3-global-enabled.nginx-proxy.tld VIRTUAL_HOST: http3-global-enabled.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
ENABLE_HTTP3: "true" 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: services:
http3-vhost-enabled: http3-vhost-enabled:
image: web image: web
@ -28,6 +32,26 @@ services:
VIRTUAL_HOST: http3-vhost-default-disabled.nginx-proxy.tld VIRTUAL_HOST: http3-vhost-default-disabled.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:
web1: web1:
image: web image: web
@ -8,8 +12,30 @@ 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
environment: environment: &nginxProxyEnv
HTTP_PORT: 8080 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: services:
web1: web1:
image: web image: web
@ -17,7 +21,29 @@ services:
VIRTUAL_HOST: web2.nginx-proxy.example VIRTUAL_HOST: web2.nginx-proxy.example
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
- ./network_internal.conf:/etc/nginx/network_internal.conf: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: services:
web1: web1:
image: web image: web
@ -21,7 +25,29 @@ 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
- ./network_internal.conf:/etc/nginx/network_internal.conf: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: config:
- subnet: fd00:1::/80 - subnet: fd00:1::/80
volumes:
nginx_conf:
services: services:
web1: web1:
image: web image: web
@ -27,10 +31,36 @@ services:
- net1 - net1
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
ENABLE_IPV6: "true" ENABLE_IPV6: "true"
networks: networks:
- net1 - 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: 172.16.20.0/24
- subnet: fd00:cafe:face:feed::/64 - subnet: fd00:cafe:face:feed::/64
volumes:
nginx_conf:
services: services:
ipv4only: ipv4only:
image: web image: web
@ -32,12 +36,40 @@ services:
ipv6_address: fd00:cafe:face:feed::2 ipv6_address: fd00:cafe:face:feed::2
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
networks: networks: &nginxProxyNetworks
ipv4net: ipv4net:
ipv4_address: 172.16.10.3 ipv4_address: 172.16.10.3
dualstacknet: dualstacknet:
ipv4_address: 172.16.20.3 ipv4_address: 172.16.20.3
ipv6_address: fd00:cafe:face:feed::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: 172.16.20.0/24
- subnet: fd00:cafe:face:feed::/64 - subnet: fd00:cafe:face:feed::/64
volumes:
nginx_conf:
services: services:
ipv4only: ipv4only:
image: web image: web
@ -32,14 +36,44 @@ services:
ipv6_address: fd00:cafe:face:feed::2 ipv6_address: fd00:cafe:face:feed::2
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
PREFER_IPV6_NETWORK: "true" PREFER_IPV6_NETWORK: "true"
networks: networks: &nginxProxyNetworks
ipv4net: ipv4net:
ipv4_address: 172.16.10.3 ipv4_address: 172.16.10.3
dualstacknet: dualstacknet:
ipv4_address: 172.16.20.3 ipv4_address: 172.16.20.3
ipv6_address: fd00:cafe:face:feed::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