簡體   English   中英

將現有Rails應用程序部署到AWS Elastic Beanstalk

[英]Deploying an existing Rails app to AWS Elastic Beanstalk

我是Rails的新手,我正在嘗試將現有的Rails應用程序部署到AWS Elastic Beanstalk。 但我得到的只是“Congralutions頁面”(僅供參考:我可以使用“rails server”在“localhost:3000”上運行應用程序)

我按照以下指示說明: http//docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html

任何幫助,將不勝感激。 謝謝。

這是我做的:

# cd /var/www/myapp
# bundle update
# bundle install
# git init 
# git add .
# git commit -m "Initial commit"
# eb init
 // .....configuration
 // ..
# eb start
# git add .gitignore && git commit -m "Ignore .elasticbeanstalk from Git"
# git aws.push
# eb status --verbose

Retrieving status of environment "pb03-env".
URL     : pb03-env-biyaffm422.elasticbeanstalk.com
Status  : Ready
Health  : Green
Environment Name:       pb03-env
Environment ID:         e-mpnrf7js5g
Solution Stack:         32bit Amazon Linux running Ruby 1.9.3
Version Label:          git-5d8712738fd03dee0d5e6a8782055089e028f22d-1364429448649
Date Created:           2013-03-27 23:48:49
Date Updated:           2013-03-28 00:14:30
Description:            None

RDS Database: AWSEBRDSDatabase | aazyq.c0pga7irhsn.us-east-1.rds.amazonaws.com:3306
Database Engine:        mysql 5.5.27
Allocated Storage:      5
Instance Class:         db.t1.micro
Multi AZ:               False
Master Username:        ebroot
Creation Time:          2013-03-27 23:53:41
DB Instance Status:     available

我發現了發生了什么。 這是一個“git”問題。

這是一個類似的問題,在下面的帖子中指出: 部署到heroku - 無法擺脫“歡迎使用rails”默認頁面除了它為Heroku而已。

無論如何,這就是我解決它的方法:

git rm public/index.html
git commit -m "Removed public/index.html"
git aws.push

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM