Just to keep my Docker reverse-proxy configuration
You need to install Docker - Install Docker
And docker-compose - Install docker-compose
Install apache2-utils package
$ sudo apt-get install -y apache2-utilsGenerate the password with htpasswd
$ htpasswd -nb admin your_secret_passwordUse the output to configure users in your traefik.toml file
In the same file set your email for Let's Encrypt configuration and domains you want to get certificate
Create a docker network for the proxy to share with containers
$ docker network create proxyCheck that network was created
$ docker network lsWe will add others containers to this network to be proxied
Create an empty file named acme.json
$ touch acme.jsonAnd fix the permission to this file so only root user can read and write this file.
$ chmod 600 acme.jsonThen you can run "startProxy.sh" script
$ ./startProxy.shYou will be prompted to fill a domain name. This domain will be used to access your Traefik dashboard from your browser
It's done your Traefik reverse-proxy is working. You can add docker containers to Traefik
To be able to use labels in docker-compose.yml file you need to get the 1.16.1 docker-compose version (https://stackoverflow.com/questions/47094460/docker-compose-having-problems-with-labels)
In order to clone your project you should choose another port than 22. If you have a firewall, allow the chosen port and let the Gitlab container redirect it to port 22. (Ex: 0.0.0.0:2222 -> 22/tcp)
The clone command then will be a little different. Here's an example:
$ git clone ssh://git@git.domain.com:<port>/<team>/<project>- DigitalOcean - How to Use Traefik as a Reverse Proxy for Docker Containers on Ubuntu 16.04 - Tutorial
- bardina.net - Utilisation de Traefik pour Portainer et Gitlab - Tutorial
- Théo Herveux - Initial work - MyGit