volumes: nginx_conf: services: web1: image: web expose: - "81" environment: WEB_PORTS: 81 VIRTUAL_HOST: nginx-proxy.example VIRTUAL_PATH: /web1/ VIRTUAL_DEST: / NETWORK_ACCESS: internal web2: image: web expose: - "82" environment: WEB_PORTS: 82 VIRTUAL_HOST: nginx-proxy.example VIRTUAL_PATH: /web2/ VIRTUAL_DEST: / sut: profiles: - singleContainer image: nginxproxy/nginx-proxy:test volumes: - &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"