Docker Stack to initialize a Swarm Cluster with Traefik as reverse proxy and Swarmpit to visualize the cluster.
This compose file was created to be deployed inside a Swarm Cluster. For more info on how to create a Swarm cluster check the Docker Docs.
You could also use our terraform template to deploy a Swarm cluster in AWS.
All the following commands must be executed in a Swarm Manager node.
First, we will create the overlay network that Traefik
will use to distribute the load across the entire Cluster. We are naming this network traefik-net
,
but feel free to give it the name you want. Just remember to change the name in the compose file too.
docker network create -d overlay traefik-net
Clone this repository and deploy the stack specifying the domain to use for Traefik rules.
$ git clone https://github.com/acidtango/swarm_init.git
$ DOMAIN_NAME=your-domain.com docker stack deploy -c swarm_init/docker-compose.yml infrastructure