version: "3.6"
services:
  shibauth:
    image: testing-shibboleth
    deploy:
      labels:
        # router for basic auth based access (https)
        - "traefik.http.routers.shibauth.rule=Host(`shib.pdas.prism.eox.at`)"
        - "traefik.http.routers.shibauth.middlewares=compress@file,cors@file"
        - "traefik.http.routers.shibauth.tls=true"
        - "traefik.http.routers.shibauth.tls.certresolver=default"
        - "traefik.http.routers.shibauth.entrypoints=https"
        # router for basic auth based access (http)
        - "traefik.http.routers.shibauth-redirect.rule=Host(`shib.pdas.prism.eox.at`)"
        - "traefik.http.routers.shibauth-redirect.middlewares=redirect@file"
        - "traefik.http.routers.shibauth-redirect.entrypoints=http"
        # general
        - "traefik.http.services.shibauth.loadbalancer.sticky=false"
        - "traefik.http.services.shibauth.loadbalancer.server.port=80"
        - "traefik.docker.network=shib-extnet"
        - "traefik.docker.lbswarm=true"
        - "traefik.enable=true"
      replicas: 1
      placement:
        constraints: [node.role == manager]
    networks:
      - extnet
networks:
  extnet:
    name: shib-extnet
    external: true
