Created
May 31, 2012 15:10
-
-
Save adigitalnative/2844039 to your computer and use it in GitHub Desktop.
Capistrano for Team 4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'bundler/capistrano' | |
server "50.116.60.38", :web, :db, :app, primary: true | |
set :user, "root" | |
set :application, "Demobot" | |
set :deploy_to, "/home/apps/#{application}" | |
set :deploy_via, :remote_cache | |
set :scm, "git" | |
set :repository, "git@github.com:HungryAcademyTeam4/sinatra_demo.git" | |
set :branch, "master" | |
default_run_options[:pty] = true | |
namespace :deploy do | |
desc "Start the Thin processes" | |
task :bundle_install do | |
run "cd /home/apps/#{application}/current && bundle install" | |
end | |
task :start do | |
bundle_install | |
run "cd /home/apps/#{application}/current && bundle exec ruby ./app.rb" | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Deploying to our server | |
1. Install capistrano (if not already installed) | |
gem install capistrano | |
2. Ensure that the current 'master' branch on Github is the one you want to push to the server | |
2. On your machine, navigate to your app's directory | |
3. Deploy to the server: | |
cap deploy | |
4. Start up the app | |
cap deploy:start | |
You can view it at 50.116.60.38:(port) - at least until we have a domain. | |
You should the be good! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment