Are you running multiple docker containers/projects? Then it's very likely that you struggle with the port numbers that needs to be assigned to every container. This project gives you an easy way to add local domain names to your docker containers.
- http://localhost:3000 ➡️ http://dashboard.local
- http://localhost:9090 ➡️ https://api.example.local
- etc...
- plus, it adds an easy way to add https
With 5 simple steps you should be able to use hostnames instead of ports:
- Add a shell snippet that starts a Traefik proxy container
- Add the Traefik rules to your docker compose file
- Link your docker network to the
development-proxy
network - Add your local url to your
/etc/hosts
file - (optional) Add SSL certificates for https
Ready? Set up the development proxy for your project(s).
Once you have the development proxy running:
- Catch localhost traffic on port 80/443, and reroute your local domains
- The Traefik dashboard is available at http://localhost:10081