Reputation: 2112
an nginx.conf file is as follows:
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
proxy_pass http://localhost:3000/;
}
location /events/ {
proxy_pass http://localhost:3001/;
proxy_buffering off;
proxy_read_timeout 1000s;
}
}
}
Have the following contents stored in ~/.ec2/ (probably needs to be moved to get capistrano to work)
cert-123456789ABCDEF0123456789ABCDEF0.pem
pk-123456789ABCDEF0123456789ABCDEF0.pem
ec2-keypair
Currently have the following deploy.rb (but it's not working)
set :application, "clashcentral"
set :repository, "[email protected]:HairyMezican/GameLobby.git"
set :branch, "master"
set :repository_cache, "git_cache"
set :deploy_via, :remote_cache
set :ssh_options, { :forward_agent => true }
set :scm, :git
ssh_options[:keys] = [File.join(ENV["HOME"], ".ec2", "ec2-keypair")]
role :web, "ec2-12-34-56-789.compute-1.amazonaws.com"
role :app, "ec2-12-34-56-789.compute-1.amazonaws.com"
role :db, "ec2-12-34-56-789.compute-1.amazonaws.com", :primary => true
connection failed for: ec2-12-34-56-789.compute-1.amazonaws.com (Net::SSH::AuthenticationFailed: Empty)
set :user, "ec2-user"
is failed: "sh -c 'if [ -d /u/apps/clashcentral/shared/git_cache ]; then cd /u/apps/clashcentral/shared/git_cache && git fetch -q origin && git fetch --tags -q origin && git reset -q --hard cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd && git clean -q -d -x -f; else git clone -q [email protected]:HairyMezican/GameLobby.git /u/apps/clashcentral/shared/git_cache && cd /u/apps/clashcentral/shared/git_cache && git checkout -q -b deploy cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd; fi'" on ec2-12-34-56-789.compute-1.amazonaws.com
Upvotes: 2
Views: 724
Reputation: 104110
I believe you need to add:
set :user, "ec2-user"
to your deploy.rb
file, as seen here: http://wiki.dreamhost.com/Capistrano#Automate_Deployment_with_Capistrano_.28.22capify.22.29
Upvotes: 1