lndj / traefik-with-swarm

A traefik demo with docker swarm for little / personal project (You don't need k8s).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Traefix Proxy With Docker Swarm

A traefik demo with docker swarm for little / personal project (You don't need k8s).

Feature

  1. Auto https With Let's encrypt.
  2. Auto load balance.
  3. Proxy dashboard.

Getting started

  1. Create a docker network
docker network create -d overlay proxy-net

More info: Docker document

  1. Create traefik stack
docker swarm init

docker stack  deploy -c traefik-proxy-compose.yml traefik-proxy
  1. Start your service
docker stack  deploy -c service-compose.yml my-service

Remark

When use traefik dashboard with http basic auth, use this command generate password:

echo $(htpasswd -nb user yourpassword) | sed -e s/\\$/\\$\\$/g

About

A traefik demo with docker swarm for little / personal project (You don't need k8s).

License:MIT License