63 lines
1.1 KiB
YAML
63 lines
1.1 KiB
YAML
networks:
|
|
netA:
|
|
netB:
|
|
|
|
|
|
volumes:
|
|
nginx_conf:
|
|
|
|
|
|
services:
|
|
reverseproxy:
|
|
profiles:
|
|
- singleContainer
|
|
container_name: reverseproxy
|
|
networks:
|
|
- netA
|
|
image: nginxproxy/nginx-proxy:test
|
|
volumes:
|
|
- &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:
|
|
profiles:
|
|
- separateContainers
|
|
container_name: reverseproxy
|
|
networks:
|
|
- netA
|
|
image: nginx:alpine
|
|
volumes:
|
|
- *confVolume
|
|
labels:
|
|
- "com.github.nginx-proxy.nginx-proxy.nginx"
|
|
|
|
webA:
|
|
networks:
|
|
- netA
|
|
image: web
|
|
expose:
|
|
- 81
|
|
environment:
|
|
WEB_PORTS: 81
|
|
VIRTUAL_HOST: webA.nginx-proxy
|
|
|
|
webB:
|
|
networks:
|
|
- netB
|
|
image: web
|
|
expose:
|
|
- 82
|
|
environment:
|
|
WEB_PORTS: 82
|
|
VIRTUAL_HOST: webB.nginx-proxy
|