Code Monkey home page Code Monkey logo

traefik-examples's Introduction

traefik examples

In this repo I want to report my experiences with traefik in my home network. All the configurations (if possible) are made with docker-compose so you have fewer places where you have to make changes.

In my network I need some services and the most are on docker but with the change that browsers don't like http anymore, I need a way to configure httpS for all the services and I don't like to remember the port for every specific site. The solution is a reverse proxy and I have found with traefik a nice solution.

Getting Started

Examples

All this examples are based on traefik version 2.x.

  • basic: installation of traefik with SSL trough Let's Encrypt
  • oauth: use OAuth to protect a site with Google login
  • fileprovider: connect trough traefik a server not in docker
  • dashboard: dashboard connection with api.insecure=false
  • authelia: SSO and 2FA with a local server
  • tcp: TCP entry point for non HTTP services
  • mTLS: securing services with mutual TLS (mTLS)
  • Guacamole: installing guide for Guacamole
  • Ping: check the traefik status with an http ping
  • Nextcloud: personal office online with ONLYOFFICE
  • network segregation: segment the traffic of containers
  • multiple domains: multi domain pointing to a single container

Installing

  1. For each example there is a separate folder, copy this files to your machine.

  2. In the root directory of this repo there is a variable file var.env. Download it and rename in .env. The most configurations options specific for your installation are in this file. You can copy it to every example you want to try.

  3. In the docker-compose.yml you find all the configuration to generate and configure the docker containers.

  4. In every example folder you find a README.md with a guide to the relative case.

Files & Folders structure of examples

.
├── FileProvider             # folder for dynamic traefik configuration (server not in docker)
│   └── file-provider.toml   # dynamic config file
├── .env                     # variable for docker-compose.yml
├── acme.json                # Let's Encrypt SSL certificates
└── docker-compose.yml

Help me

If you find a problem in this guide or in the configurations files you can open an issue on GitHub. Thanks!

traefik-examples's People

Contributors

frigi83 avatar salleq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

traefik-examples's Issues

Bad English text

English is not my mother language and the text is not correct.

Please help me!

Aiuto con openblocks

Ciao mi aiuteresti con questa configurazione?
il container è openblocks:
image: "openblocksdev/openblocks-ce"
container_name: openblocks
Grazie Paolo
`

Start Traefik with the latest version

traefik:
image: traefik:v2.8
container_name: traefik
command:
# Enable Hub communication (open the port 9900 and 9901 by default)
- --experimental.hub=true
- --api.insecure=true
- --entrypoints.web.address=:80
- --providers.docker

volumes:
  - /var/run/docker.sock:/var/run/docker.sock

labels:
  traefik.http.routers.dash.rule: Host(`dash.localhost`)
  traefik.http.routers.dash.service: api@internal

ports:
  - "80:80"
  - 3000:3000

openblocks:
image: "openblocksdev/openblocks-ce"
container_name: openblocks
#ports:
# - "3000:3000"
labels:
- traefik.enable=true
- "traefik.http.routers. openblocks.rule=Host('localhost')"
- "traefik.tcp.routers.openblocks.entrypoints=tcpep"
- "traefik.tcp.routers.openblocks.service=openblocksService"
- "traefik.tcp.services.openblocksService.loadBalancer.server.port=3000"
restart: unless-stopped
`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.