所以我有一个 Rails 应用程序并正在部署到 ec2。我成功完成了 cap deploy:setup、cap deploy:check 和 cap:deploy。然后我尝试访问该 url,但我实际上不确定我的应用程序在哪里或者是否有更多步骤。我尝试访问http://xxx.us-west-2.compute.amazonaws.com/var/www/highlandsfacebookart,但一无所获。
这是我的 deploy.rb
set :application, "highlandsfacebookart"
set :repository, "repository-url"
set :user, 'ec2-user'
set :use_sudo, false
set :deploy_to, "/var/www/#{application}#"
#set :deploy_via, :remote_cache
set :deploy_via, :copy
set :normalize_asset_timestamps, false
set :ssh_options, { :forward_agent => true }
ssh_options[:keys] = %w(~/highlandsfbkey.pem)
set :scm, "git"
# set :scm, :git # You can set :scm explicitly or Capistrano will make an intelligent guess based on known version control directory names
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
role :web, "xxx.compute.amazonaws.com" # Your HTTP server, Apache/etc
role :app, "xxx.us-west-2.compute.amazonaws.com" # This may be the same as your `Web` server
role :db, "xxx.us-west-2.compute.amazonaws.com", :primary => true # This is where Rails migrations will run
role :db, "xxx.compute.amazonaws.com"