This guide is about deployment and configuration of traefik with docker and docker-compose. The settings of traefik are saved within the compose file.
If you are looking for more information the following guide is also very good.
- Traefik
- Create a new docker network thats independent from your traefik compose
docker network create -d bridge traefik_proxy
- Change email address in traefik compose
- From
admin@example.com
to whatever your email is
- From
- Open port 80/tcp and 443/tcp if you use an external firewall
- Create a new docker network thats independent from your traefik compose
- Webservice
- Notice:
docker-compose_whoami.yml
is an example - Set up your domain or subdomain to point to your servers ip address
- Add the external network to your service compose
- Add the network to the desired service within the compose
- Add the labels to the desired service within the compose
whoami
is used as a name for the traefik service and router. Change this to whatever is useful for you.
- Change the port to the internal port of your service
- You do not need to publish your ports
- Change domain from
whoami.example.com
to whatever your domain is
- Notice:
- Access Web UI
- On a remote server you can forward the port to your local maschine with an ssh tunnel
- SSH tunnel example:
ssh -L 8080:127.0.0.1:8080 user@example.com
- SSH tunnel example:
- Open http://127.0.0.1:8080
- On a remote server you can forward the port to your local maschine with an ssh tunnel