Traefik is an open-source reverse proxy and load balancer.
Docker Image is from traefik, found here.
- Generate a password with
generate_password.sh
Note
This step is entirely optional. To skip this step, edit docker-compose.yml and remove the line at the bottom that specifies the password
-
Update
traefik.yml
with your correct contact information (Email) -
Create an
.env
file with:
DOMAIN=traefik.domain
TLD=com
TRAEFIK_USER=admin
TRAEFIK_PASSWORD_HASH=<password from generate_password.sh>
- Add DNS Provider specific configuration to
.env
anddocker-compose.yml
. In my case, I'm using CloudFlare, and so my file will have the following:
CLOUDFLARE_DNS_API_TOKEN=<some token>
environment:
- CLOUDFLARE_DNS_API_TOKEN=${CLOUDFLARE_DNS_API_TOKEN}
Other DNS Providers will have differing configuration. You can find providers here and additional configuration here.
- Configure the following directories, as this guide assumes that Focus is cloned to
$HOME/dev/focus
, as that is my own personal preference. This behaviour can be configured with the following indocker-compose.yml
.
- ${HOME}/dev/focus/traefik/traefik.yml:/traefik.yml:ro
- ${HOME}/dev/focus/traefik/rules:/rules:ro
- ${HOME}/dev/focus/traefik/letsencrypt:/letsencrypt
- Run it!
docker-compose up -d
Note
This assumes that focus
is checked out at $HOME/dev/focus
!
This container will have its image automatically updated via watchtower.
N/A