Skip to content

Commit

Permalink
update traefic routes.
Browse files Browse the repository at this point in the history
  • Loading branch information
wildone committed Jan 30, 2024
1 parent 715c93d commit bfa1884
Showing 1 changed file with 46 additions and 20 deletions.
66 changes: 46 additions & 20 deletions services/_traefik/config/dynamic/dynamic.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@

http:
routers:

flow:
rule: Host(`flow.typerefinery.localhost`)
# rule: ( Host(`{{ env "TRAEFIK_HOST_DOMAIN" }}`) && PathPrefix(`/flow`) ) || Host(`flow.localhost`)
service: flow
entrypoints:
- web
middlewares:
# - error-pages
- serviceheaders
flow-https:
rule: Host(`flow.typerefinery.localhost`)
# rule: ( Host(`{{ env "TRAEFIK_HOST_DOMAIN" }}`) && PathPrefix(`/flow`) ) || Host(`flow.localhost`)
service: flow
entrypoints:
- websecure
tls: true
middlewares:
# # - error-pages
- serviceheaders

fastapi:
rule: Host(`api.typerefinery.localhost`)
# rule: ( Host(`{{ env "TRAEFIK_HOST_DOMAIN" }}`) && PathPrefix(`/api`) ) || Host(`api.localhost`)
Expand Down Expand Up @@ -125,7 +146,6 @@ http:
entrypoints:
- web
middlewares:
- error-pages
- serviceheaders
nginx-https:
rule: Host(`nginx.typerefinery.localhost`)
Expand All @@ -138,24 +158,6 @@ http:
- error-pages
- serviceheaders

flow:
rule: Host(`flow.typerefinery.localhost`)
# rule: ( Host(`{{ env "TRAEFIK_HOST_DOMAIN" }}`) && PathPrefix(`/flow`) ) || Host(`flow.localhost`)
service: flow
entrypoints:
- web
middlewares:
- error-pages
flow-https:
rule: Host(`flow.typerefinery.localhost`)
# rule: ( Host(`{{ env "TRAEFIK_HOST_DOMAIN" }}`) && PathPrefix(`/flow`) ) || Host(`flow.localhost`)
service: flow
entrypoints:
- websecure
tls: true
middlewares:
- error-pages
- serviceheaders

tms:
rule: Host(`tms.typerefinery.localhost`)
Expand Down Expand Up @@ -217,6 +219,20 @@ http:
- error-pages
tls: true

# http-catchall:
# # attached only to web entryPoint
# entryPoints:
# - "web"
# - "websecure"
# # catchall rule
# rule: "PathPrefix(`/`)"
# service: unavailable
# # lowest possible priority
# # evaluated when no other router is matched
# priority: 1
# middlewares:
# - tocustom404

# http-catchall:
# rule: "HostRegexp(`{host:.+}`)"
# entryPoints:
Expand Down Expand Up @@ -266,10 +282,15 @@ http:
# - "500"
# - "503"

tocustom404:
redirectregex:
regex: ^(.*)
replacement: https://nginx.typerefinery.localhost:8101/_errors_/404.html

# cors
serviceheaders:
headers:
accesscontrolalloworiginlist: "https://cms.typerefinery.localhost:8101, https://flow.typerefinery.localhost:8101, https://api.typerefinery.localhost:8101"
accesscontrolalloworiginlist: "https://cms.typerefinery.localhost:8101, https://flow.typerefinery.localhost:8101, https://api.typerefinery.localhost:8101, http://cms.typerefinery.localhost:8101, http://flow.typerefinery.localhost:8101, http://api.typerefinery.localhost:8101"
accesscontrolallowmethods: "GET, POST, PUT, DELETE, OPTIONS"
accesscontrolallowheaders: "*"
addvaryheader: true
Expand Down Expand Up @@ -339,6 +360,11 @@ http:
- "Websight-Token"

services:
# Service that will always answer a 503 Service Unavailable response
unavailable:
loadBalancer:
servers: {}

cms:
loadBalancer:
passHostHeader: true
Expand Down

0 comments on commit bfa1884

Please sign in to comment.