Skip to content

Commit

Permalink
Merge pull request #7 from masarakki/fix_unicorn_conf
Browse files Browse the repository at this point in the history
fix unicorn conf
  • Loading branch information
masarakki committed Mar 29, 2013
2 parents 225b3c1 + add5725 commit d56cfe8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions config/unicorn/production.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
working_directory '/home/masaki/www/ss_editor/current'
RAILS_ROOT = '/home/masaki/www/ss_editor/current'
working_directory RAILS_ROOT

listen File.join(working_directory, 'tmp/pids/.sock')
listen File.expand_path('tmp/pids/.sock', RAILS_ROOT)

stderr_path File.expand_path('log/unicorn.log', ENV['RAILS_ROOT'])
stdout_path File.expand_path('log/unicorn.log', ENV['RAILS_ROOT'])
stderr_path File.expand_path('log/unicorn.log', RAILS_ROOT)
stdout_path File.expand_path('log/unicorn.log', RAILS_ROOT)

preload_app true
pid File.expand_path('tmp/pids/unicorn.pid', ENV['RAILS_ROOT'])
pid File.expand_path('tmp/pids/unicorn.pid', RAILS_ROOT)

before_fork do |server, worker|
defined?(ActiveRecord::Base) and ActiveRecord::Base.connection.disconnect!
Expand Down

0 comments on commit d56cfe8

Please sign in to comment.