Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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