services:
  idp-one.127-0-0-1.nip.io:
    image: kristophjunge/test-saml-idp:1.15
    volumes:
      - ./metadata/authsources.php:/var/www/simplesamlphp/config/authsources.php
      - ./metadata/one-relyingparties.php:/var/www/simplesamlphp/metadata/saml20-sp-remote.php
    environment:
      - PORT=${SERVER_PORT:-8080}
      
  idp-two.127-0-0-1.nip.io:
    image: kristophjunge/test-saml-idp:1.15
    volumes:
      - ./metadata/authsources.php:/var/www/simplesamlphp/config/authsources.php
      - ./metadata/two-relyingparties.php:/var/www/simplesamlphp/metadata/saml20-sp-remote.php
    environment:
      - PORT=${SERVER_PORT:-8080}

  nginx:
    image: nginx:stable
    links:
      - idp-one.127-0-0-1.nip.io
      - idp-two.127-0-0-1.nip.io
    volumes:
      - ./nginx:/etc/nginx:ro
    ports:
      - '80:80'
      - '443:443'
