Traefik 2.0 + Docker — an Advanced Guide

containeroo
2 min readSep 24, 2019
Source: https://docs.traefik.io/assets/img/routers.png

Introduction

This tutorial is the second part of this article. We will go trough the following configurations:

  1. Add a file provider* to traefik.yml
  2. Create a config file for a central configuration for storing middlewares config.yml.
  3. Configure a middleware chain

*file provider is another place where you can store your configuration

You will find all the required configuration files in our Git repository.

EDIT: Unfortunately there is currently an issue with embedded Gists on the Medium Desktop site (mobile works fine). You can find all our Gists here.

Prerequisites

In order to follow along, you’ll need to read this post!

Update Traefik configuration

To setup a reusable middleware add an additional provider in the Traefik configuration file traefik.yml (Lines 15 and 16).

--

--