简体   繁体   English

通过 Github 在 DigitalOcean 上自动部署 docker-compose

[英]Automatically deploying docker-compose on DigitalOcean via Github

I am a newbie when it comes to docker.我是 docker 的新手。 I have a web app that contains 4 services.我有一个包含 4 个服务的 web 应用程序。 I manage to create a docker-compose for it.我设法为它创建了一个 docker-compose。

I would like now to publish it.我现在想发布它。 My plan is to我的计划是

  1. upload the whole repository with the compose file and the source codes to a private repository in github.将包含 compose 文件和源代码的整个存储库上传到 github 中的私有存储库。
  2. then create a droplet in digital ocean然后在数字海洋中创建一个水滴

I would like to be able to publish the code easily through github only.我希望能够仅通过 github 轻松发布代码。 that it will be automatically uploaded to the server and restart the required services.它将自动上传到服务器并重新启动所需的服务。 what would be the best approach?最好的方法是什么?

Yes, there is.就在这里。 There is an App platefrom in Digitalocean. Digitalocean中有一个应用程序板。 Once you use it to deploy your docker image and whenever you update docker image via github, your site will be rebuilding (ci/cd).一旦你使用它来部署你的 docker 映像,并且每当你通过 github 更新 docker 映像时,你的站点将被重建 (ci/cd)。 I hope this can be help for you.我希望这对你有帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM