Forked from richardprice/gist:0ccde40b0df06191228e5bde7558e1e3
Created
February 26, 2017 21:50
-
-
Save Yggdrasil/1f1a139ea1b2e55b834761cf987fb80a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
1. Create the KV config: | |
docker run traefik \ | |
storeconfig \ | |
--consul \ | |
--consul.prefix="traefik" \ | |
--consul.watch \ | |
--consul.endpoint="CONSUL_IP:8500" \ | |
--consulcatalog=true \ | |
--consulcatalog.endpoint="CONSUL_IP:8500" \ | |
--consulcatalog.constraints="tag==public" \ | |
--logLevel=DEBUG \ | |
--entryPoints='Name:https Address::443 TLS' \ | |
--entryPoints='Name:http Address::80' \ | |
--acme.entrypoint=https \ | |
--acme=true \ | |
--acme.domains="DOMAIN" \ | |
--acme.ondemand=true \ | |
--acme.onhostrule=true \ | |
--acme.email="EMAIL" \ | |
--acme.storage="traefik/acme/account" \ | |
--web \ | |
--web.address=":8089" | |
2. Log into consul UI and remove the /traefik/acme/accounts/storageFile key - if this exists, Traefik will exit with an error about "Error creating TLS config Empty Store, please provide a key for certs storage" (see https://github.com/containous/traefik/issues/927) | |
3. Start Traefik using the consul backend: | |
docker run --name ingress-lb \ | |
-p 80:80 -p 443:443 -p 8089:8089 \ | |
-d \ | |
traefik \ | |
--consul \ | |
--consul.prefix="traefik" \ | |
--consul.watch \ | |
--consul.endpoint="CONSUL_IP:8500" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment