Sure, it works. We run multiple small SaaS solutions on Docker Swarm with Traefik reverse proxy, self-hosting on some dedicated servers and cloud VMs.
Not much development happening with Swarm, some bug fixing, no new features. But that has the advantage that it just works, no need to adapt to new APIs or changing config.
One of the challenges is running Postgres in HA, as former standard Spilo seems not really maintained anymore, everything seems to move to cloudnative-pg, which requires k8s. MongoDB cluster runs fine.
Hint when starting: make sure to manually set a larger netmask for your overlay network(s), or you can only have 255 overall Swarm service instances.
I’m not a swarm user so @bluepuma77 can confirm, but try running
docker network inspect ingress
You will see the default swarm ingress network is 10.0.0.0/24 24 means you can only use the last segment so you could have values from 0 to 255. Including broadcast, network and gateway IPs. So if you have many services and each get’s an IP, you will run out of free IPs. It is not just a Swarm “issue”. You would need to configure the network in Kubernetes as well.
By the way, as far as I know, Docker is focusing on Development environments currently, not Swarm, so if you need more than open source community support, you would probably want to check the offer of Mirantis which bought the Enterprise part of Docker years ago
I am not sure if the address pool you choose conflicts with the default address pool docker uses for the bridge networks. If you don’t use bridge network, I assume it should be fine.
I think Docker can recognize already existing networks , so it should only be a problem if the Docker bridge is manually configured to use the colliding IP range or if it already existed before changing the Docker Swarm address pool. I don’t know if Docker Swarm would allow that.