Share feedback, ideas and get community help

Updated 3 months ago

Sharing docker swarm setup

I just wanted to share, in case anyone else gets value from this...

I wanted to be able to run multiple instances of the viewer to ensure if the connection to the viewer goes down or gets overloaded. I solved this in a docker swarm configuration (a personal favorite). I used the same docker-compose.yml file and .env files I use to set up a standalone instance, but instead of 'docker compose up -d', I used 'docker stack deploy -c docker-compose.yml typebot'. I then changed the publish mode of the resulting viewer and builder services, which are attached to a custom swarm overlay network, to "host" instead of "ingress" (for external access). Now I have replication and failover for both the builder and viewer. In the end, I reduced the replicas for the builder to 0 and set the viewer at 1 for now, but I can easily scale. I've tied in my load balancer so it will automatically scale with new containers. I use Portainer to manage my swarm and have my swarm spread over one master+worker and three other worker nodes.
Add a reply
Sign up and join the conversation on Discord