Created
April 11, 2013 21:13
-
-
Save sadjow/5367213 to your computer and use it in GitHub Desktop.
Capistrano configuration file.
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" | |
#set :rvm_ruby_string, "1.9.3" | |
set :rvm_type, :system | |
set :use_sudo, false | |
default_run_options[:pty] = true | |
set :shared_children, shared_children + %w{public/uploads} | |
set :application, "app" | |
set :repository, "[email protected]:sadjow/app.git" | |
set :branch, 'master' | |
set :user, 'appuser' | |
set :password, 'app_password' | |
set :deploy_to, '/home/appuser/apps/app/' | |
set :scm, :git | |
set :git_shallow_clone, 1 | |
set :keep_releases, 3 | |
set :normalize_asset_timestamps, false | |
# 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, "000.000.000.000" # Your HTTP server, Apache/etc | |
role :app, "000.000.000.000" # This may be the same as your `Web` server | |
role :db, "000.000.000.000", :primary => true # This is where Rails migrations will run | |
#role :db, "your slave db-server here" | |
# if you want to clean up old releases on each deploy uncomment this: | |
after "deploy:restart", "deploy:cleanup" | |
# if you're still using the script/reaper helper you will need | |
# these http://github.com/rails/irs_process_scripts | |
# If you are using Passenger mod_rails uncomment this: | |
namespace :deploy do | |
task :start do ; end | |
task :stop do ; end | |
task :restart, :roles => :app, :except => { :no_release => true } do | |
run "touch #{File.join(current_path,'tmp','restart.txt')}" | |
end | |
end | |
namespace :deploy do | |
desc "reload the database with seed data" | |
task :seed do | |
run "cd #{current_path}; rake db:seed RAILS_ENV=#{rails_env}" | |
end | |
end | |
namespace :deploy do | |
desc "Cria um usuário padrão" | |
task :mix_user do | |
run "cd #{current_path}; rake create_user[[email protected],AQUIOPASSWORD!] RAILS_ENV=#{rails_env}" | |
end | |
end | |
namespace :deploy do | |
namespace :albums do | |
desc "Recria todas as fotos do album" | |
task :recreate_photos do | |
run "cd #{current_path}; rake albums:recreate_photos RAILS_ENV=#{rails_env}" | |
end | |
end | |
end | |
require "rvm/capistrano" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment