1

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.

4

1 回答 1

1

在多次尝试之后docker swarm,我确实在并发和编排问题上遇到了很多困难,因此我决定坚持使用docker-compose我更舒服的方法。

以下是我实现滚动更新的方式:https ://github.com/docker/compose/issues/1786#issuecomment-579794865

尽管观察者告诉我这与 swarm 默认执行的策略类似,但它实际上工作得非常好。

所以我想我的大部分问题都通过删除节点的复制而消失了。

当我有时间时,我会再试一次swarm。现在,compose对我来说做得很好。

于 2020-02-13T11:57:58.950 回答