/traefik-examples

Minimalistic examples for Traefik reverse proxy and docker-compose. Locally executable for easy testing and adjusting to your own needs.

Primary LanguageHTMLMIT LicenseMIT

Traefik Examples

This repository covers basic examples for using Traefik and Docker. All examples can be executed locally, which allows easy testing and adjusting to your own needs.
A lot of these examples are explained in detail in my blog: jensknipper.de. In case you are running in some problems or need some background information you should take a look at these articles.

For the purpose of simpler declaration I will not make use of configuration files, but only use docker labels.

Feel free to open tickets or merge requests if you think something is missing.

Overview

Authentication

Basic Authentication - e.g. secure Traefik dashboard

Dashboard

Expose Traefik Dashboard to Subdomain

Logging

Enable Logging

Enable Access Logging

Ports

Additional entrypoint

Serve non HTTP/HTTPS ports

Redirects

HTTP to HTTPS redirect

Global HTTP to HTTPS redirect
Per Domain HTTP to HTTPS redirect

HTTP to HTTPS and with www redirect

Global HTTP to HTTPS and www to non-www redirect

Redirect to external url

Redirect to subdomain

Reverse Proxy

SSL

Auto-SSL with Let's Encrypt

Auto-SSL with HTTP-Challenge (NOT WORKING LOCALLY!)

Upcoming Topics

  • https and www redirect - www to non-www version
  • https and www redirect - per service
  • auto-ssl dns challenge
  • ssl including own (wildcard) certificate
  • digest auth
  • rate limiting
  • load balancing
  • port instead of domain