Introduction
I usually like used Nginx as proxy to host multiple services on the same server, but however, when we need to use a quick and simple configuration, it is good to use Traefik as our proxy server.
So let’s use Traefik !
What exactly is Traefik ???
An open-source reverse proxy and load balancer for HTTP and TCP-based applications that is easy, dynamic, automatic, fast, full-featured, production proven, provides metrics, and integrates with every major cluster technology.
Basically traefik is a reverse proxy and load balancer for HTTP / TCP apps . Is linked with various technologies and can be easily installed in any stack.
In particular Docker and Kubernetes liked well compatibility with, this article would like to center the Docker + Traefik.
Environment
- Vagrant (Ubuntu 18.84)
- Docker + docker-compose
In this case we will launch simple a blog and wiki service under domain test.localdomain
Domains:
For this test add the following items to the host file to try it out locally.
root@vagrant:/home/vagrant# echo '127.0.0.1 blog.test.localdomain' > /etc/hosts
root@vagrant:/home/vagrant# echo '127.0.0.1 wiki.test.localdomain' >> /etc/hosts
root@vagrant:/home/vagrant# cat /etc/hosts
127.0.0.1…