http:
  routers:
    dashboard-admin:
      rule: "Host(`pos.hsgold.id`)"
      entrypoints: "websecure"
      middlewares:
        - cors
        - http-to-https
          #        - ipwhitelist
      service: dashboard-admin
      tls: true
    apiservice:
      rule: "Host(`api.hsgold.id`)"
      entrypoints: "websecure"
      middlewares:
        - cors
        - http-to-https
          #        - ipwhitelist
      service: apiservice
      tls: true
    vpn:
      rule: "Host(`vpn.hsgold.id`)"
      entrypoints: "websecure"
      middlewares:
        - http-to-https
      service: vpn
      tls: true
    phppgadmin:
      rule: "Host(`phppgadmin.hsgold.id`)"
      entrypoints: "websecure"
      middlewares:
        - http-to-https
      service: phppgadmin
      tls: true
    dozzle:
      rule: "Host(`dozzle.hsgold.id`)"
      entrypoints: "websecure"
      middlewares:
        - http-to-https
      service: dozzle
      tls: true        
  middlewares:
    http-to-https:
      redirectScheme:
        scheme: https
        permanent: true
    ipwhitelist:
      ipWhiteList:
        sourceRange:
           - 172.19.0.0/24        
    cors:
      headers:
        accessControlAllowMethods: "*"
        accessControlAllowOriginList: "*"
        accesscontrolExposeHeaders: "*"
        accesscontrolAllowHeaders: "*"
        accessControlMaxAge: 100
        addVaryHeader: true
  services:
    dashboard-admin:
      loadbalancer:
        servers:
        - url: http://dashboard-admin:80
    apiservice:
      loadbalancer:
        servers:
        - url: http://apiservice:8000
    vpn:
      loadbalancer:
        servers:
          - url: http://wg-easy:51821
    dozzle:
      loadbalancer:
        servers:
          - url: http://dozzle:8080
    phppgadmin:
      loadbalancer:
        servers:
          - url: http://phppgadmin:8080            
tls:
  certificates:
    - certFile: /certificates/wild-hsgold-id.pem
      keyFile: /certificates/wild-hsgold-id.key
