Commit cc03a74f authored by Matthieu Vachon's avatar Matthieu Vachon

Customize app root directory in unicorn.rb.erb template

parent 58e1b83a
......@@ -62,6 +62,7 @@ template File.join(gitlab['path'], 'config', 'unicorn.rb') do
user gitlab['user']
group gitlab['group']
variables({
:app_root => gitlab['path'],
:unicorn_workers_number => gitlab['unicorn_workers_number'],
:unicorn_timeout => gitlab['unicorn_timeout']
})
......
......@@ -32,24 +32,24 @@ worker_processes <%= @unicorn_workers_number %>
# Help ensure your application will always spawn in the symlinked
# "current" directory that Capistrano sets up.
working_directory "/home/git/gitlab" # available in 0.94.0+
working_directory "<%= @app_root %>" # available in 0.94.0+
# listen on both a Unix domain socket and a TCP port,
# we use a shorter backlog for quicker failover when busy
listen "/home/git/gitlab/tmp/sockets/gitlab.socket", :backlog => 64
listen "<%= @app_root %>/tmp/sockets/gitlab.socket", :backlog => 64
listen "127.0.0.1:8080", :tcp_nopush => true
# nuke workers after 30 seconds instead of 60 seconds (the default)
timeout <%= @unicorn_timeout %>
# feel free to point this anywhere accessible on the filesystem
pid "/home/git/gitlab/tmp/pids/unicorn.pid"
pid "<%= @app_root %>/tmp/pids/unicorn.pid"
# By default, the Unicorn logger will write to stderr.
# Additionally, some applications/frameworks log to stderr or stdout,
# so prevent them from going to /dev/null when daemonized here:
stderr_path "/home/git/gitlab/log/unicorn.stderr.log"
stdout_path "/home/git/gitlab/log/unicorn.stdout.log"
stderr_path "<%= @app_root %>/log/unicorn.stderr.log"
stdout_path "<%= @app_root %>/log/unicorn.stdout.log"
# combine Ruby 2.0.0dev or REE with "preload_app true" for memory savings
# http://rubyenterpriseedition.com/faq.html#adapt_apps_for_cow
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment