split out unicorn config into environments
This commit is contained in:
@@ -2,22 +2,14 @@
|
|||||||
app_path = "/var/www/danbooru2/current"
|
app_path = "/var/www/danbooru2/current"
|
||||||
|
|
||||||
# Set unicorn options
|
# Set unicorn options
|
||||||
if Socket.gethostname =~ /sonohara|hijiribe/
|
worker_processes 12
|
||||||
worker_processes 12
|
|
||||||
else
|
|
||||||
worker_processes 1
|
|
||||||
end
|
|
||||||
|
|
||||||
preload_app false
|
preload_app false
|
||||||
timeout 180
|
timeout 180
|
||||||
listen "127.0.0.1:9000"
|
listen "127.0.0.1:9000"
|
||||||
|
|
||||||
# Spawn unicorn master worker for user apps (group: apps)
|
# Spawn unicorn master worker for user apps (group: apps)
|
||||||
if Socket.gethostname =~ /li246/
|
user 'albert', 'albert'
|
||||||
user 'danbooru', 'danbooru'
|
|
||||||
else
|
|
||||||
user 'albert', 'albert'
|
|
||||||
end
|
|
||||||
|
|
||||||
# Fill path to your app
|
# Fill path to your app
|
||||||
working_directory app_path
|
working_directory app_path
|
||||||
25
config/unicorn/staging.rb
Normal file
25
config/unicorn/staging.rb
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
# Set your full path to application.
|
||||||
|
app_path = "/var/www/danbooru2/current"
|
||||||
|
|
||||||
|
# Set unicorn options
|
||||||
|
worker_processes 2
|
||||||
|
|
||||||
|
preload_app false
|
||||||
|
timeout 180
|
||||||
|
listen "127.0.0.1:9000"
|
||||||
|
|
||||||
|
# Spawn unicorn master worker for user apps (group: apps)
|
||||||
|
user 'danbooru', 'danbooru'
|
||||||
|
|
||||||
|
# Fill path to your app
|
||||||
|
working_directory app_path
|
||||||
|
|
||||||
|
# Should be 'production' by default, otherwise use other env
|
||||||
|
rails_env = ENV['RAILS_ENV'] || 'production'
|
||||||
|
|
||||||
|
# Log everything to one file
|
||||||
|
stderr_path "log/unicorn.log"
|
||||||
|
stdout_path "log/unicorn.log"
|
||||||
|
|
||||||
|
# Set master PID location
|
||||||
|
pid "#{app_path}/tmp/pids/unicorn.pid"
|
||||||
Reference in New Issue
Block a user