Reputation: 22198
So I have been using docker
with docker-compose
for quite some time in a development environment, I love how easy it is.
Until now, I also used docker-compose
to serve my apps on my own server as I could afford short down times like docker-compose restart
.
But in my current project, we need rolling updates.
We still have one node, and it shall remain as we don't plan on having scalability issue for quite some time.
I read I need to use docker swarm
, fine, but when I look for some tutorials on how to set it up, along with using my docker-compose.yml
files, I can't find any developer-oriented (instead of devops) resources that would simply tell me the steps to achieve this, even though I don't understand everything it is ok, as I will along the way.
Are there any tutorials to learn how to set this up out there? If not, shouldn't we build it here?
I am definitely sure we are quite numerous to have the issue, as docker is now a must have for devs, but we (devs) still don't want to dive too deep into the devops world.
Cheers, hope it gets attention instead of criticism.
Upvotes: 0
Views: 429
Reputation: 22198
After giving multiple tries to docker swarm
, I did struggle a lot with concurrency and orchestration issues, hence I decided to stick with docker-compose
which I'm much more comfortable with.
Here's how I achieved rolling updates: https://github.com/docker/compose/issues/1786#issuecomment-579794865
It works actually pretty nice though observers told me it was a similar strategy to what swarm does by default.
So I guess most of my issues went away by removing replication of nodes.
When I get time, I'll give swarm another try. For now, compose
does a great job for me.
Upvotes: 1