Rails 中的 EC2 部署
我知道这个问题可能已经被问过很多次了,但我并没有真正找到一个好的答案。我试图找到一个最简单的解决方案,基本上只需在 ec2 实例上签出 git 项目,签出特定分支,然后重新启动 apache 服务器。
我不确定 Capistrano 是否是我需要的。我对一些 shell 脚本或 ruby 脚本很满意,它们基本上只是调用诸如“git clone...”、“git checkoutbranch...”和“重新启动 apache 服务器”之类的命令
是否有一个框架可以让我这样做我真的不必从头开始编写脚本。
I know this question has probably been asked so many times here, but I didn't really find a good answer. I'm trying to find a simplest solution to do basically just checkout a git project on an ec2 instance, checkout a specific branch and then restart apache server.
I'm not sure if Capistrano is what I need. I'm fine with some shell script or ruby script which basically just invokes commands like 'git clone....', 'git checkout branch...' and 'restart apache server'
Is there a framework which lets me do this so I don't really have to write a script from scratch.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,我们是在谈论“部署”还是“只是获取代码库并复制到服务器”?
在第一种情况下,部署是一组常见的做法,如下:
它实际上意味着管理全栈应用程序,而不仅仅是“重启” httpd”或其他东西。
Capistrano 是在 37signals 的贡献下开发的,他们正在许多项目中使用它。许多项目使用 capistrano 或相同的工具来进行部署。再看看这个,它很容易设置和使用。
First off, are we talking about "Deployment" or about "just get a codebase and copy to the server"?
In the first case, Deployment is a set of common practices, as following:
It's actually mean manage the full-stack application, not only "restart httpd" or something else.
Capistrano developed with 37signals contributions and they are using it on many projects. A lot of projects use capistrano or the same tool to do deployments. Look at this again, it's easy to setup and use.