繁体   English   中英

使用Capistrano将Rails应用程序部署到EC2

[英]Deploying rails app to EC2 using capistrano

因此,我将通过本教程http://blog.grio.com/2012/07/how-to-deploy-your-web-app-to-amazon-ec2-using-capistrano.html来部署Rails应用到EC2,我对deploy.rb中的一些内容感到困惑。 在文件的默认版本中,我有:

role :web, "your web-server here"                          # Your HTTP server, Apache/etc
role :app, "your app-server here"                          # This may be the same as your `Web` server
role :db,  "your primary db-server here", :primary => true # This is where Rails migrations will run
role :db,  "your slave db-server here"

但是,以前我是在分配了URL的heroku上托管的。 由于这将是一个Facebook应用程序,因此我不想处理获取URL的问题,是否可以像在heroku上那样自动获取一个URL? 另外,这背后的想法是什么,即它在做什么?

set :deploy_to, "/var/www/myapp"

当您运行Capistrano时,您是在本地计算机上运行它的。

的:

"your web-server here"     

是您要将应用程序部署到的远程服务器的IP地址。

的:

set :deploy_to    

在所需的服务器上指定文件夹。

暂无
暂无

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

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