volumes: nginx_conf: services: web1: image: web expose: - "81" environment: WEB_PORTS: "81" VIRTUAL_HOST: "www.nginx-proxy.tld" VIRTUAL_PATH: "/web1/" VIRTUAL_DEST: "/" web2: image: web expose: - "82" environment: WEB_PORTS: "82" VIRTUAL_HOST: "www.nginx-proxy.tld" VIRTUAL_PATH: "/web2/" VIRTUAL_DEST: "/" sut: profiles: - singleContainer image: nginxproxy/nginx-proxy:test volumes: - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro - &certs ./certs:/etc/nginx/certs:ro - &acmeRoot ./acme_root:/usr/share/nginx/html:ro sut-dockergen: profiles: - separateContainers image: nginxproxy/nginx-proxy:test-dockergen volumes: - &confVolume nginx_conf:/etc/nginx/conf.d - *dockerSocket - *certs - *acmeRoot sut-nginx: profiles: - separateContainers container_name: nginx-proxy image: nginx:alpine volumes: - *confVolume - *certs - *acmeRoot labels: - "com.github.nginx-proxy.nginx-proxy.nginx"