2024-12-30 11:59:07 +01:00
|
|
|
# In this scenario, we have a wildcard certificate for `*.web.nginx-proxy.tld` and 3 web containers:
|
|
|
|
# - 1.web.nginx-proxy.tld
|
|
|
|
# - 2.web.nginx-proxy.tld
|
|
|
|
# - 3.web.nginx-proxy.tld
|
|
|
|
#
|
|
|
|
# We want web containers 1 and 2 to support SSL, but 3 should not (using `HTTPS_METHOD=nohttps`)
|
2017-03-15 02:11:21 +01:00
|
|
|
|
|
|
|
services:
|
2024-12-30 11:59:07 +01:00
|
|
|
nginx-proxy:
|
2017-03-15 02:11:21 +01:00
|
|
|
volumes:
|
|
|
|
- /var/run/docker.sock:/tmp/docker.sock:ro
|
2024-12-30 11:59:07 +01:00
|
|
|
- ${PYTEST_MODULE_PATH}/certs_wildcard_nohttps:/etc/nginx/certs:ro
|
|
|
|
- ${PYTEST_MODULE_PATH}/acme_root:/usr/share/nginx/html:ro
|
2017-03-15 02:11:21 +01:00
|
|
|
|
|
|
|
web1:
|
|
|
|
image: web
|
|
|
|
expose:
|
|
|
|
- "81"
|
|
|
|
environment:
|
|
|
|
WEB_PORTS: "81"
|
|
|
|
VIRTUAL_HOST: "1.web.nginx-proxy.tld"
|
|
|
|
web2:
|
|
|
|
image: web
|
|
|
|
expose:
|
|
|
|
- "82"
|
|
|
|
environment:
|
|
|
|
WEB_PORTS: "82"
|
|
|
|
VIRTUAL_HOST: "2.web.nginx-proxy.tld"
|
|
|
|
|
|
|
|
web3_nohttps:
|
|
|
|
image: web
|
|
|
|
expose:
|
|
|
|
- "83"
|
|
|
|
environment:
|
|
|
|
WEB_PORTS: "83"
|
|
|
|
VIRTUAL_HOST: "3.web.nginx-proxy.tld"
|
2019-02-04 15:15:04 -05:00
|
|
|
HTTPS_METHOD: nohttps
|