Skip to content

Latest commit

 

History

18 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

My Docker Traefik configuration

Just to keep my Docker reverse-proxy configuration

Getting starting

You need to install Docker - Install Docker

And docker-compose - Install docker-compose

Installation

Install apache2-utils package

$ sudo apt-get install -y apache2-utils

Generate the password with htpasswd

$ htpasswd -nb admin your_secret_password

Use 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 proxy

Check that network was created

$ docker network ls

We will add others containers to this network to be proxied

Create an empty file named acme.json

$ touch acme.json

And fix the permission to this file so only root user can read and write this file.

$ chmod 600 acme.json

Then you can run "startProxy.sh" script

$ ./startProxy.sh

You 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

Warnings

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>

Tutorials

  • 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

Authors

  • Théo Herveux - Initial work - MyGit

About

My docker Traefik configuration

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages