Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- entryPoints:
- web:
- address: ":80" # For HTTP
- websecure:
- address: ":443" # For HTTPS
- certificatesResolvers:
- letsencrypt:
- acme:
- storage: /acme.json
- httpChallenge:
- entryPoint: web
- http:
- routers:
- # Redirect all HTTP to HTTPS
- redirect-to-https:
- entryPoints:
- - web
- rule: "HostRegexp(`{host:.+}`)"
- service: noop
- middlewares:
- - https-redirect
- # HTTPS Router for UserService
- userservice-router:
- entryPoints:
- - websecure
- rule: "Host(`srv.domain.be`) && PathPrefix(`/userservice`)"
- service: userservice-service
- tls:
- certResolver: letsencrypt
- # HTTPS Router for QuizzService
- quizzservice-router:
- entryPoints:
- - websecure
- rule: "Host(`srv.domain.be`) && PathPrefix(`/quizzservice`)"
- service: quizzservice-service
- tls:
- certResolver: letsencrypt
- middlewares:
- https-redirect:
- redirectScheme:
- scheme: https
- services:
- # Placeholder service for redirection
- noop:
- loadBalancer:
- servers:
- - url: "http://127.0.0.1"
- # UserService configuration
- userservice-service:
- loadBalancer:
- servers:
- - url: "http://userservice:8081"
- # QuizzService configuration
- quizzservice-service:
- loadBalancer:
- servers:
- - url: "http://quizzservice:8083"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement