- Requires Ruby 1.9.2 or higher.
- Requires ´
gem 'pg' # PostgreSQL´ in Gemfile
Replace 127.0.0.1 with the ip of the server
ssh root@127.0.0.1adduser deployer --ingroup sudoexitcat ~/.ssh/id_rsa.pub | ssh deployer@127.0.0.1 -p 22 'cat >> ~/.ssh/authorized_keys'- Edit deploy.rb (IP & app name)
- Edit unicorn_init.sh (app name)
- Edit unicorn_production.rb & environments/production.rb (app name)
- Edit config/recipes/templates/nginx_unicorn.erb (domain)
- Uncomment
load 'deploy/assets'in your capfile if it exists, otherwise runcapify .in the root of your rails app and then uncomment it cap deploy:install(installs latest nginx, unicorn, node.js, postgresql, rbenv, ruby 1.9.3-p194)cap deploy:setup(symlinks application, creates database for application, creates startup scripts for unicorn)cap deploy:cold
Visit the url and you should see your deployed application.