diff --git a/config/deploy.rb b/config/deploy.rb index eb0d6a7..dd3d980 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -22,19 +22,16 @@ role :app, '66.209.73.11' role :db, '66.209.73.11', primary: true +namespace :customs do + task :symlink, roles: :app do + run "ln -nfs #{shared_path}/database.yml #{latest_release}/config/database.yml" + end +end + require 'capistrano-unicorn' after 'deploy:restart', 'deploy:cleanup' after 'deploy:restart', 'unicorn:restart' - -# 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 +after 'deploy:update_code' do + customs.symlink +end diff --git a/config/unicorn/production.rb b/config/unicorn/production.rb index 7c9ea3a..f8994c4 100644 --- a/config/unicorn/production.rb +++ b/config/unicorn/production.rb @@ -9,7 +9,8 @@ pid "#{root_path}/tmp/pids/unicorn.pid" -listen "#{root_path}/tmp/sockets/unicorn.sock", backlog: 2048 +# listen "#{root_path}/tmp/sockets/unicorn.sock", backlog: 2048 +listen '127.0.0.1:5000' stderr_path "#{root_path}/log/unicorn.stderr.log" stdout_path "#{root_path}/log/unicorn.stdout.log"