I consider this README crystal clear. It should be quick for you to try the elements of this repo. If there is anything that I could improve, please let me know.
Source: https://github.com/pascalandy/docker-stack-this
It’s great to test this setup.
But I recommand using this setup: https://github.com/pascalandy/docker-stack-this/tree/master/traefik-haproxy
Create a two nodes on http://labs.play-with-docker.com/
apk update && apk upgrade && apk add nano curl bash git
docker swarm init --advertise-addr=$(hostname -i)
Join node2 to the cluster from command docker swarm init generated. Warning: You need to reformat the command docker has generated for you. Put this command into one single line.
BEFORE:
docker swarm join \
--token SWMTKN-1-58x1bngt2esj8enkr0q71bn98t3vn96cqld9ay9tbe06urvsmt-
7ko3krnrglwj9x90lt7vsimym \
10.0.25.3:2377
AFTER:
docker swarm join --token SWMTKN-1-58x1bngt2esj8enkr0q71bn98t3vn96cqld9ay9tbe06urvsmt-7ko3krnrglwj9x90lt7vsimym 10.0.25.3:2377
git clone https://github.com/pascalandy/docker-stack-this.git
cd docker-stack-this/traefik-basic
docker network create --driver overlay --subnet 10.10.10.0/24 --opt encrypted ntw_front
docker stack deploy traefik -c traefik.yml
docker stack deploy who1 -c who1.yml
docker stack deploy who2 -c who2.yml
docker stack deploy caddy1 -c caddy1.yml
docker stack deploy nginx1 -c nginx1.yml
Click on port 8080 from the PWD Gui. It will allow you the get the unique URL domain for this session.
http://pwd10_0_25_3-8080.host2.labs.play-with-docker.com/dashboard/#/
#____# On PWD pay attention
http://pwd10_0_25_3-80.host2.labs.play-with-docker.com/who1/
#__# On PWD pay attention
http://pwd10_0_25_3-80.host2.labs.play-with-docker.com/who2/
#__# On PWD pay attention
http://pwd10_0_25_3-80.host2.labs.play-with-docker.com/caddy1/
#__# On PWD pay attention
http://pwd10_0_25_3-80.host2.labs.play-with-docker.com/nginx1/
#__# On PWD pay attention
docker network ls && \
docker stack ls && \
docker stack ps traefik
docker network inspect ntw_front
docker network inspect ntw_front | grep who1
docker service logs --tail=10 traefik_traefik
docker service logs -f traefik_traefik
docker service ps traefik_traefik
docker service update -d=false --replicas 5 who1_who1
# OLD WAY docker service scale who1_who1=5
curl http://localhost:8080/api/providers
curl http://localhost/caddy1/
docker stack rm traefik
docker stack rm who1
docker stack rm who2
docker stack rm caddy1
docker stack rm nginx1
docker network rm ntw_front
P.S. If you have solid skills 🤓 with Docker Swarm, Bash (and the gang)… plus you would love 💚 to help a startup to launch 🔥 a solid project, I would love to get to know you 🍻. Buzz me 👋 on Twitter @askpascalandy. I’m looking for bright and caring people to join in this journey 🌇.
Here, I shared the details of the challenges I’m facing at the moment.
Containerize carefully!
____ _ _ _
| _ \ __ _ ___ ___ __ _| | / \ _ __ __| |_ _
| |_) / _` / __|/ __/ _` | | / _ \ | '_ \ / _` | | | |
| __/ (_| \__ \ (_| (_| | | / ___ \| | | | (_| | |_| |
|_| \__,_|___/\___\__,_|_| /_/ \_\_| |_|\__,_|\__, |
|___/





