Traefik 2.0 + Docker — an Advanced Guide

Image for post
Image for post
Source: https://docs.traefik.io/assets/img/routers.png

Introduction

Prerequisites

Update Traefik configuration

/opt/containers/traefik/traefik.yml
touch /opt/containers/traefik/data/config.yml
/opt/containers/traefik/data/config.yml
/opt/containers/traefik/docker-compose.yml
docker-compose up -d

Attention, Attention:

Use the new Middleware

- "traefik.http.routers.traefik.middlewares=https-redirect@file"
/opt/containers/portainer/docker-compose.yml

Middleware-Chain

/opt/containers/traefik/data/config.yml
/opt/containers/traefik/data/config.yml
/opt/containers/traefik/data/config.yml
- "traefik.http.routers.portainer-secure.middlewares=secured@file"
- "traefik.http.middlewares.nc-header.headers.customFrameOptionsValue=SAMEORIGIN"
- "traefik.http.routers.nextcloud-secure.middlewares=secured@file,nc-header"

Written by

where containers happen

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store