Skip to content

Latest commit

 

History

History
53 lines (41 loc) · 1.68 KB

README.md

File metadata and controls

53 lines (41 loc) · 1.68 KB

Just a simple Traefik Proxy

Table of Contents

About

This is a template for your traefik proxies to manage your containers routers

Getting Started

To get start rename the .env.example file to .env and use it to customize your own router.

Usage

You can start your traefik router just starting the container using docker compose up -d

Add a another application to the router

To add another application to your new router add customs labels to your docker-compose files

Example :

services:
    yourserviceName:
        ...
        labels:
            ...
            - "traefik.enable=true"
            - "traefik.docker.network=web-applications"
            - "traefik.http.routers.webendpoint.entrypoints=web"
            - "traefik.http.routers.webendpoint.rule=Host(`yourhostame`)"
            - "traefik.http.routers.webendpoint.middlewares=webendpoint-middleware"
            - "traefik.http.routers.webendpoint-secure.tls=true"
            - "traefik.http.routers.webendpoint-secure.entrypoints=websecure"
            - "traefik.http.routers.webendpoint-secure.rule=Host(`yourhostame`)"
            - "traefik.http.middlewares.webendpoint-middleware.redirectscheme.scheme=https"
            - "traefik.http.middlewares.webendpoint-middleware.redirectscheme.permanent=true"
        networks:
            ...
            - web-applications
networks:
    ...
    web-applications:
        name: web-applications
        external: true