Skip to content

Instantly share code, notes, and snippets.

@daloulou
Last active December 15, 2020 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save daloulou/9b220b056eaf66f333673a08cbc0cefb to your computer and use it in GitHub Desktop.
Save daloulou/9b220b056eaf66f333673a08cbc0cefb to your computer and use it in GitHub Desktop.
Traefik dynamic configuration file to Add SSL on Azure Container Instance
## Define Traefik endpoint route
[http]
[http.routers.api]
entryPoints = ["https"]
service = "api@internal"
rule = "Host(`{{env "TRAEFIK_URL"}}`)"
[http.routers.api.tls]
certResolver = "le"
## Define our App endpoint route to service "my-service"
[http.routers.my-api-route]
entryPoints = ["https"]
service = "my-service"
rule = "Host(`{{env "MY_APP_URL"}}`)"
[http.routers.my-api-route.tls]
certResolver = "le"
## Dynamic configuration
[http.services]
## load-balancing rule to our app container
[http.services.my-service.loadBalancer]
[[http.services.my-service.loadBalancer.servers]]
url = "http://127.0.0.1:9090" ## As we are in the same container group, container can talk to each other through localhost or 127.0.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment