test: separate containers (contd)

This commit is contained in:
Nicolas Duchon 2024-12-18 22:46:05 +01:00
parent e0bbd59313
commit b6f0556b70
16 changed files with 325 additions and 170 deletions

View file

@ -16,7 +16,19 @@ services:
- netA - netA
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
docker-gen:
profiles:
- separateContainers
networks:
- netA
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
environment:
NGINX_CONTAINER_NAME: reverseproxy
reverseproxynginx: reverseproxynginx:
profiles: profiles:
@ -26,22 +38,10 @@ services:
- netA - netA
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
docker-gen:
profiles:
- separateContainers
networks:
- netA
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_conf:/etc/nginx/conf.d
environment:
NGINX_CONTAINER_NAME: reverseproxy
webA: webA:
networks: networks:
- netA - netA

View file

@ -24,26 +24,26 @@ services:
- singleContainer - singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
volumes: volumes:
- /var/run/docker.sock:/f00.sock:ro - &dockerSocket /var/run/docker.sock:/f00.sock:ro
environment: environment: &nginxProxyEnv
DOCKER_HOST: unix:///f00.sock DOCKER_HOST: unix:///f00.sock
sutdockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
environment:
<<: *nginxProxyEnv
sutnginx: sutnginx:
profiles: profiles:
- separateContainers - separateContainers
container_name: nginx-proxy container_name: nginx-proxy
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
sutdockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- /var/run/docker.sock:/f00.sock:ro
- nginx_conf:/etc/nginx/conf.d
environment:
DOCKER_HOST: unix:///f00.sock

View file

@ -43,12 +43,23 @@ services:
profiles: profiles:
- singleContainer - singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
environment: environment: &nginxProxyEnv
ACME_HTTP_CHALLENGE_LOCATION: "false" ACME_HTTP_CHALLENGE_LOCATION: "false"
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
sutdockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
environment:
<<: *nginxProxyEnv
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
sutnginx: sutnginx:
profiles: profiles:
@ -56,19 +67,8 @@ services:
container_name: nginx-proxy container_name: nginx-proxy
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
- ./certs:/etc/nginx/certs:ro - *certs
- ./acme_root:/usr/share/nginx/html:ro - *acmeRoot
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
sutdockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
environment:
ACME_HTTP_CHALLENGE_LOCATION: "false"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_conf:/etc/nginx/conf.d
- ./certs:/etc/nginx/certs:ro

View file

@ -44,9 +44,18 @@ services:
- singleContainer - 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
sutdockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *certs
sutnginx: sutnginx:
profiles: profiles:
@ -54,17 +63,8 @@ services:
container_name: nginx-proxy container_name: nginx-proxy
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
- ./certs:/etc/nginx/certs:ro - *certs
- ./acme_root:/usr/share/nginx/html:ro - *acmeRoot
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
sutdockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_conf:/etc/nginx/conf.d
- ./certs:/etc/nginx/certs:ro

View file

@ -24,32 +24,32 @@ services:
profiles: profiles:
- singleContainer - singleContainer
image: nginxproxy/nginx-proxy:test image: nginxproxy/nginx-proxy:test
environment: environment: &nginxProxyEnv
ACME_HTTP_CHALLENGE_LOCATION: "legacy" ACME_HTTP_CHALLENGE_LOCATION: "legacy"
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
sutnginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
volumes:
- nginx_conf:/etc/nginx/conf.d:ro
- ./certs:/etc/nginx/certs:ro
- ./acme_root:/usr/share/nginx/html:ro
sutdockergen: sutdockergen:
profiles: profiles:
- separateContainers - separateContainers
image: nginxproxy/nginx-proxy:test-dockergen image: nginxproxy/nginx-proxy:test-dockergen
environment: environment:
ACME_HTTP_CHALLENGE_LOCATION: "legacy" <<: *nginxProxyEnv
volumes: volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro - &confVolume nginx_conf:/etc/nginx/conf.d
- nginx_conf:/etc/nginx/conf.d - *dockerSocket
- ./certs:/etc/nginx/certs:ro - *certs
sutnginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *certs
- *acmeRoot
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -1,6 +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
- ./50x.html:/usr/share/nginx/html/errors/50x.html:ro - &customErrorPage ./50x.html:/usr/share/nginx/html/errors/50x.html:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *customErrorPage
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *customErrorPage
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"

View file

@ -8,9 +8,19 @@ services:
- singleContainer - 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
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/default_location:ro - &defaultLocation ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/default_location:ro
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/web3.nginx-proxy.example_location:ro - &vhostLocation ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/web3.nginx-proxy.example_location:ro
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *defaultLocation
- *vhostLocation
nginx-proxy-nginx: nginx-proxy-nginx:
profiles: profiles:
@ -18,22 +28,12 @@ services:
container_name: nginx-proxy container_name: nginx-proxy
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/default_location:ro - *defaultLocation
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/web3.nginx-proxy.example_location:ro - *vhostLocation
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_conf:/etc/nginx/conf.d
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/default_location:ro
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/web3.nginx-proxy.example_location:ro
web1: web1:
image: web image: web
expose: expose:

View file

@ -8,8 +8,17 @@ services:
- singleContainer - 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
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/proxy.conf:ro - &defaultConf ./my_custom_proxy_settings_f00.conf:/etc/nginx/proxy.conf:ro
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *defaultConf
nginx-proxy-nginx: nginx-proxy-nginx:
profiles: profiles:
@ -17,20 +26,11 @@ services:
container_name: nginx-proxy container_name: nginx-proxy
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/proxy.conf:ro - *defaultConf
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_conf:/etc/nginx/conf.d
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/proxy.conf:ro
web1: web1:
image: web image: web
expose: expose:

View file

@ -8,9 +8,19 @@ services:
- singleContainer - 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
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example_location:ro - &vhostLocationConf ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example_location:ro
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430_location:ro - &regexLocationConf ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430_location:ro
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *vhostLocationConf
- *regexLocationConf
nginx-proxy-nginx: nginx-proxy-nginx:
profiles: profiles:
@ -18,22 +28,12 @@ services:
container_name: nginx-proxy container_name: nginx-proxy
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example_location:ro - *vhostLocationConf
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430_location:ro - *regexLocationConf
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_conf:/etc/nginx/conf.d
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example_location:ro
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430_location:ro
web1: web1:
image: web image: web
expose: expose:

View file

@ -8,9 +8,19 @@ services:
- singleContainer - 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
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example:ro - &vhostConf ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example:ro
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430:ro - &regexConf ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430:ro
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *vhostConf
- *regexConf
nginx-proxy-nginx: nginx-proxy-nginx:
profiles: profiles:
@ -18,22 +28,12 @@ services:
container_name: nginx-proxy container_name: nginx-proxy
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example:ro - *vhostConf
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430:ro - *regexConf
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_conf:/etc/nginx/conf.d
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/vhost.d/web1.nginx-proxy.example:ro
- ./my_custom_proxy_settings_bar.conf:/etc/nginx/vhost.d/561032515ede3ab3a015edfb244608b72409c430:ro
web1: web1:
image: web image: web
expose: expose:

View file

@ -8,8 +8,17 @@ services:
- singleContainer - 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
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/conf.d/my_custom_proxy_settings_f00.conf:ro - &proxyConf ./my_custom_proxy_settings_f00.conf:/etc/nginx/conf.d/my_custom_proxy_settings_f00.conf:ro
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *proxyConf
nginx-proxy-nginx: nginx-proxy-nginx:
profiles: profiles:
@ -17,20 +26,11 @@ services:
container_name: nginx-proxy container_name: nginx-proxy
image: nginx:alpine image: nginx:alpine
volumes: volumes:
- nginx_conf:/etc/nginx/conf.d:ro - *confVolume
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/conf.d/my_custom_proxy_settings_f00.conf:ro - *proxyConf
labels: labels:
- "com.github.nginx-proxy.nginx-proxy.nginx" - "com.github.nginx-proxy.nginx-proxy.nginx"
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- nginx_conf:/etc/nginx/conf.d
- ./my_custom_proxy_settings_f00.conf:/etc/nginx/conf.d/my_custom_proxy_settings_f00.conf:ro
web1: web1:
image: web image: web
expose: expose:

View file

@ -1,11 +1,37 @@
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
environment: environment: &nginxProxyEnv
DEBUG_ENDPOINT: "true" DEBUG_ENDPOINT: "true"
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
environment:
<<: *nginxProxyEnv
nginx-proxy-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
debug_enabled: debug_enabled:
image: web image: web
expose: expose:

View file

@ -1,8 +1,32 @@
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
nginx-proxy-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
nginx-proxy-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
debug_disabled1: debug_disabled1:
image: web image: web
@ -20,7 +44,6 @@ services:
WEB_PORTS: 82 WEB_PORTS: 82
VIRTUAL_HOST: disabled2.debug.nginx-proxy.example VIRTUAL_HOST: disabled2.debug.nginx-proxy.example
debug_enabled: debug_enabled:
image: web image: web
expose: expose:

View file

@ -1,9 +1,35 @@
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
- ./custom-fallback.conf:/etc/nginx/conf.d/zzz-custom-fallback.conf:ro - &customFallback ./custom-fallback.conf:/etc/nginx/conf.d/zzz-custom-fallback.conf:ro
sut-dockergen:
profiles:
- separateContainers
image: nginxproxy/nginx-proxy:test-dockergen
volumes:
- &confVolume nginx_conf:/etc/nginx/conf.d
- *dockerSocket
- *customFallback
sut-nginx:
profiles:
- separateContainers
container_name: nginx-proxy
image: nginx:alpine
volumes:
- *confVolume
- *customFallback
labels:
- "com.github.nginx-proxy.nginx-proxy.nginx"
http-only: http-only:
image: web image: web

View file

@ -1,9 +1,35 @@
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
- ./nodefault.certs:/etc/nginx/certs:ro - &certs ./nodefault.certs:/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"
https-and-http: https-and-http:
image: web image: web

View file

@ -1,12 +1,40 @@
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
- ./withdefault.certs:/etc/nginx/certs:ro - &certs ./withdefault.certs:/etc/nginx/certs:ro
environment: environment: &nginxProxyEnv
HTTPS_METHOD: redirect HTTPS_METHOD: redirect
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"
https-only: https-only:
image: web image: web
expose: expose: