Last active
December 15, 2020 14:13
-
-
Save daloulou/9b220b056eaf66f333673a08cbc0cefb to your computer and use it in GitHub Desktop.
Traefik dynamic configuration file to Add SSL on Azure Container Instance
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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