Commits

paulopatto committed 4c653fd

configurando deploy automatizado

  • Participants
  • Parent commits 2dfdd2d

Comments (0)

Files changed (5)

+load 'deploy'
+load 'deploy/assets'
+load 'config/deploy'
 gem "redcarpet", "~> 2.1.1"
 
 # Servers
-gem "thin"
-gem "unicorn"
+#gem "thin"
+#gem "unicorn"
 
 # Issue tags
 gem "acts-as-taggable-on", "2.3.1"
       capybara (>= 1.1.2)
       cucumber (>= 1.1.8)
       nokogiri (>= 1.5.0)
-    daemons (1.1.9)
     database_cleaner (0.8.0)
     devise (2.1.2)
       bcrypt-ruby (~> 3.0)
       rspec (~> 2.0)
     erubis (2.7.0)
     escape_utils (0.2.4)
-    eventmachine (0.12.10)
     execjs (1.4.0)
       multi_json (~> 1.0)
     ffaker (1.15.0)
       actionpack (>= 3.0.0)
       activesupport (>= 3.0.0)
       railties (>= 3.0.0)
-    kgio (2.7.4)
     launchy (2.1.2)
       addressable (~> 2.3)
     letter_opener (0.0.2)
       rake (>= 0.8.7)
       rdoc (~> 3.4)
       thor (>= 0.14.6, < 2.0)
-    raindrops (0.10.0)
     rake (0.9.2.2)
     raphael-rails (1.5.2)
     rdoc (3.12)
     stamp (0.1.6)
     therubyracer (0.10.2)
       libv8 (~> 3.3.10)
-    thin (1.4.1)
-      daemons (>= 1.0.9)
-      eventmachine (>= 0.12.6)
-      rack (>= 1.0.0)
     thor (0.16.0)
     tilt (1.3.3)
     treetop (1.4.10)
     uglifier (1.0.3)
       execjs (>= 0.3.0)
       multi_json (>= 1.0.2)
-    unicorn (4.3.1)
-      kgio (~> 2.6)
-      rack
-      raindrops (~> 0.7)
     vegas (0.1.11)
       rack (>= 1.0.0)
     warden (1.2.1)
   sqlite3
   stamp
   therubyracer
-  thin
   uglifier (= 1.0.3)
-  unicorn
   webmock
   yaml_db!
+require 'capistrano/ext/multistage'
+require 'bundle/capistrano'
+require 'rvm/capistrano'
+
+set :application, "gitlab"
+set :repository,  "git@bitbucket.org:paulopatto/gitlab.git"
+set :scm, :git
+# Or: `accurev`, `bzr`, `cvs`, `darcs`, `git`, `mercurial`, `perforce`, `subversion` or `none`
+set :rvm_type, :system
+set :user, 'rails'
+set :use_sudo, false
+set :stages, %w(staging production test)
+set :default_stage, 'production'
+set :deploy_to, "/home/#{user}/apps/#{application}"
+set :deploy_via, :remote_cache
+set :deploy_env, 'production'
+
+default_run_option[:pty] = true
+ssh_options[:forward_agent] = true
+
+
+# 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 "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
+  end
+end

config/deploy/production.rb

+server '192.168.50.102', :app, :web, :db, :primary => true, :branch => 'release'
+set :branch, 'release'