-
Install docker
-
Init docker swarm
docker swarm init # or docker swarm init --advertise-addr 127.0.0.1
-
Create docker network name
proxy
docker network create --attachable --driver overlay proxy
deploy
traefik
andportainer
expose default port:
80
,443
and8080
-
Clone the repository
git clone https://github.com/attapon-th/traefik-setup.git traefik
-
Go to the directory
cd traefik
-
Create Logs folder (required
sudo
)sudo mkdir /var/log/traefik
-
Gen Self-Signed for traefik
./gen-cert.sh
-
run docker stack
edit:
vi docker/traefik-stack.yml
docker stack deploy -c traefik-stack.yaml traefik
-
run portainer
docker stack deploy -c portainer-stack.yaml portainer
Portainer: https://localhost/portainer
Traefik Dashboard: https://localhost:8080/dashboard