GithubHelp home page GithubHelp logo

guilhermednt / router Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 10 KB

Simple Traefik router. Good for local development.

docker http reverse-proxy developer-tools development-environment docker-compose traefik

router's Introduction

router

Simple Traefik router. Good for local development and simple deployments.

Usage

TLS

To configure Let's Encrypt we are usind DNS Challenge.

The included example uses DigitalOcean's API but you can check other providers here

Create a .env based on .env.dist.

Using this router

Configure the web network

You need to create a web network for containers that should be exposed by the router.

$ docker network create --driver bridge --subnet your:ipv6:subnet/124 --ipv6 web

Start Router

Start the router itself with the following command:

$ docker-compose up -d

Configure your services

Now you can configure your containers to use it. Here's an example:

version: '3.5'

services:
  my_service:
    image: my/service
    labels:
      - traefik.enable=true
      - traefik.http.routers.donato.rule=Host(`example.com`)
      - traefik.http.routers.donato.tls=true
      - traefik.http.routers.donato.tls.certResolver=lets-encrypt
      - traefik.http.routers.donato.middlewares=secHeaders@file
      - traefik.port=80
    networks:
      - web

networks:
  web:
    external: true

When you start the my_service container Traefik will automatically detect it and redirect all requests for example.com to the container.

router's People

Contributors

guilhermednt avatar

Stargazers

Vasily Pyatykh avatar André "decko" de Brito avatar  avatar

Watchers

James Cloos avatar  avatar

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.