- Fresh Debian 10 Server + 80 and 443 forwarded + DNS configured
sudo groupadd docker && sudo usermod -aG docker $USER && newgrp docker
curl -fsSL https://raw.githubusercontent.com/suodrazah/docker_swarm/main/deploy.sh -o deploy.sh && sh deploy.sh
- Fresh Debian 10 or Ubuntu Server 20.04 LTS
- Local
- VPS at Linode
- $5+/month
- VPS at OVH
- $5+/month
- VPS at Oracle
- $0+/month (free tier is slow, useful for light stacks only)
- SSH Access as sudo user (not root)
- Firewall configured to allow 80/tcp, 443/tcp, 22/tcp
- Public, static IP
- Domain pointing to servers public IP address
- Google Domains
- $18+/year
- No-IP
- free
Wildcards are not free so you will have to configure subdomains manually
e.g. traefik.example.ddns.net, portainer.example.ddns.net, etc
- free
- Google Domains
- This will bring up Traefik and Portainer on a manager Docker Swarm node
sudo groupadd docker && sudo usermod -aG docker $USER && newgrp docker
curl -fsSL https://raw.githubusercontent.com/suodrazah/docker_swarm/main/deploy.sh -o deploy.sh && sh deploy.sh
Extension (i.e. add stacks):
- Check the stack Readme.md or header comments
- Create a new stack in Portainer:
Portainer
Stacks
Add Stack
Name
- e.g. site1-ignitionWeb editor
- copy contents of stack.yml fileEnvironment variables
- as described by the stack Readme.md
-
Specific subdomain (e.g. worker1.example.com) shall be configured to point at the new node public IP. Note this subdomain for entry as the node domain when requested upon execution of the script. You can use private IPs instead if so desired.
-
Additional configuration of your firewalls is required for swarm communication
-
To add a worker node run this on an existing manager node and copy the output:
docker swarm join-token worker
- On the node to be added (again, as a sudo user and not root):
sudo groupadd docker && sudo usermod -aG docker $USER && newgrp docker
curl -fsSL https://raw.githubusercontent.com/suodrazah/docker_swarm/main/add_worker.sh -o add_worker.sh && sh add_worker.sh
- Output you copied earlier from join-token command above
docker swarm join --token KEY IP:2377
- Add a label to the new node
Portainer
Swarm
<node>
+Label
Name
- e.g. worker1Value
- "True"
- Fix Traefik headers