services:
  teleport:
    image: teleport:18.7.3
    container_name: teleport-den
    restart: unless-stopped

    networks:
      - tan-network

    volumes:
      - /opt/stacks/00_teleport/config:/etc/teleport
      - /home/docker/teleport/data:/var/lib/teleport

    labels:
      - "traefik.enable=true"
      # HTTPS entry
      - "traefik.http.routers.teleport.rule=Host(`teleport.luckyden.org`)"
      - "traefik.http.routers.teleport.entrypoints=websecure"
      - "traefik.http.routers.teleport.tls=true"
      - "traefik.http.services.teleport.loadbalancer.server.port=3080"
      # - "traefik.http.routers.teleport.middlewares=authentik@docker"
      - "traefik.http.services.teleport.loadbalancer.server.scheme=http"
      - "traefik.http.middlewares.teleport-headers.headers.customrequestheaders.X-Forwarded-Proto=https"
      - "traefik.http.routers.teleport.middlewares=teleport-headers@docker"

networks:
  tan-network:
    external: true
