Docker-compose: deploying service in multiple hosts

前端 未结 4 2132
耶瑟儿~
耶瑟儿~ 2020-12-23 14:02

I have a docker-compose file that deploys 8 different docker services in the same host. Is it possible to deploy it in different hosts?, I would like to deploy some service

4条回答
  •  情深已故
    2020-12-23 14:30

    You can use docker compose version 3 which provides ability to do multi host deployment without using multiple compose files. All you need is to define labels for each node in the cluster and use the label name for placement constraint.

提交回复
热议问题