D
Dokploy•6mo ago
specialk

Swarm workers not showing containers

I'm not sure if I have a fundamental misunderstanding of how this should work, or if there is a problem. I have the following setup: Dokploy Server - Doubles as Swarm Manager app1 - Swarm Worker app2 - Swarm Worker I have connected the workers to the manager as per the Dokploy instructions. My "Cluster" shows the nodes correctly in Dokploy. Everything looks OK. I have deployed a Docker image to my Dokploy project. Dokploy shows that the image is running on all 3 nodes. However, when I SSH in to the hosts and run a docker ps, I only see the container running on the manager node. On the worker nodes, I only see the the traefik container. The Cluster page also shows that both worker servers are running Dokploy, but when I try to visit them via http://ip:3000, nothing loads, and a netstat -tulpn | grep 3000 on the hosts shows nothing listening on that port. What I'm trying to do here is to set up a load balanced application running across multiple servers, all behind a load balancer. I thought this would be relatively simple, and what Dokploy was designed to do, but either that isn't the case or I'm doing something very wrong. Any advice is appreciated.
10 Replies
Henrik
Henrik•6mo ago
I think you've confused about something here. Dokploy should only run on 1 manager node. Since you only have 1 manager, you should only have one instance of it. The same with Traefik. Did you launch the workers as remote servers?
specialk
specialkOP•6mo ago
I did originally launch them as remote servers (I'm coming from Coolify where that was how this would've been configured). I realized my mistake, re-imaged the app servers, re-added them to the swarm, but still I see 0 containers running on the worker nodes, even though Dokploy shows that they should have the image running.
Henrik
Henrik•6mo ago
Have you constrained the applications/stack to only be on a worker?
specialk
specialkOP•6mo ago
So I just launched a NEW server, configured it as per dokploy's instructions, and this time I did get a successful deployment of the swarm test app to both the dokploy host and the app server host. Strange. So my next question then is: Will this functionality allow me to set up a load balanced app? In coolify, traefik ran on each host and could direct HTTP traffic to the right container based on domain name. This would allow me to put a load balancer in front of all of our app servers and traefik would make sure that the requests hit the right container. I'm having trouble finding load balancing info in Dokploy's documentation
Henrik
Henrik•6mo ago
Here is a point where Dokploy falls short unfortunatly. They choose to use Traefik as the reverse proxy, and the community version of Traefik does not offer shared ACME. This means you're only able to have 1 ingress point to your swarm. Behind that, you can load balance as much as you want. The traffic part of a server under high load is usually not where it breaks, so you can still achieve high throughput with Dokploy Load balancing is not that well documented in Dokploy. It's still a very young competitor in this space, but it's just standard docker swarm load balancing
specialk
specialkOP•6mo ago
Unfortunately it's not really load balancing that I'm worried about - It's HA. Sounds like Dokploy is not going to be a good platform to build on top of then. Unfortunate, because I really like the platform (And can parse the code, unlike Coolify, which I can't easily follow).
Henrik
Henrik•6mo ago
As of the time being yes. Are a few of us that are trying to solve it as we speak. So you should try to lurk around. Suddenly it's there 🙂
specialk
specialkOP•6mo ago
Indeed I will. I may even try to find time to contribute to the codebase. Thank you for the information!
Henrik
Henrik•6mo ago
I may soon have a working example of achieving HA with dokploy. It currently requires completely turning off Traefik's Let's Encrypt integration, so you would currently lose the easy click Let's Encrypt option.
specialk
specialkOP•6mo ago
We don't need the LE integration anyway, so I'd be interested to see how you're achieving it.

Did you find this page helpful?