networks:
  net1:
    internal: true
  net2:


volumes:
  nginx_conf:


services:
  bridge-network:
    image: web
    environment:
      WEB_PORTS: "80"
      VIRTUAL_HOST: "bridge-network.nginx-proxy.tld"
    networks:
      - net2

  host-network:
    image: web
    environment:
      WEB_PORTS: "8080"
      VIRTUAL_HOST: "host-network.nginx-proxy.tld"
      VIRTUAL_PORT: "8080"
    network_mode: host

  sut:
    profiles:
      - singleContainer
    image: nginxproxy/nginx-proxy:test
    volumes:
      - &dockerSocket /var/run/docker.sock:/tmp/docker.sock:ro
    networks:
      - net1
      - net2

  sut-dockergen:
    profiles:
      - separateContainers
    image: nginxproxy/nginx-proxy:test-dockergen
    volumes:
      - &confVolume nginx_conf:/etc/nginx/conf.d
      - *dockerSocket
    networks:
      - net1
      - net2

  sut-nginx:
    profiles:
      - separateContainers
    container_name: nginx-proxy
    image: nginx:alpine
    volumes:
      - *confVolume
    networks:
      - net1
      - net2
    labels:
      - "com.github.nginx-proxy.nginx-proxy.nginx"