Remix.run Logo
blindlobstar 4 days ago

Why both posts mention docker compose and not mentioning docker swarm. Being using it for my projects for long time. And it's so nice. Similar syntax, easy networking, rollout strategy, easy to add nodes to cluster.

You can have one template docker-compose.yaml file and separate deployment files for different envs, like: docker-compose.dev.yaml, docker-compose.prod.yaml

I think swarm is really underrated

Havoc 4 days ago | parent | next [-]

It’s in a death spiral - not widely used so people aren’t incentivised to put time into it so not widely used

vbezhenar 4 days ago | parent | prev | next [-]

How do you solve persistence with swarm? Can I deploy postgres with network storage that will mount automatically on node where container is launched?

blindlobstar a day ago | parent [-]

> Can I deploy postgres with network storage that will mount automatically on node where container is launched?

Yes (if I'm getting your question right). here is an example of nfs volume: https://docs.docker.com/reference/compose-file/volumes/#driv...

PufPufPuf 4 days ago | parent | prev [-]

I've been there. We still ended up with messy deploy scripts written in Ruby and the only debugging solution was "just comment out everything then run line by line".

blindlobstar 4 days ago | parent [-]

'docker stack deploy' covers most of the cases. But yeah, there is still some problems like: "update a config or a secret", that require manually invoking additional commands (or via scripts)