Skip to content

Instantly share code, notes, and snippets.

@rodrigopinto
Forked from alobato/unicorn_conf.rb
Created May 5, 2014 20:59
Show Gist options
  • Save rodrigopinto/b983a6a0e26a55a993c7 to your computer and use it in GitHub Desktop.
Save rodrigopinto/b983a6a0e26a55a993c7 to your computer and use it in GitHub Desktop.
# Configuration file for Unicorn
#
# See http://unicorn.bogomips.org/Unicorn/Configurator.html for complete
# documentation.
# See also http://unicorn.bogomips.org/examples/unicorn.conf.rb for
# a more verbose configuration using more features.
app_name = "appname"
root = "/home/deployer/apps/#{app_name}/current"
# Help ensure your application will always spawn in the symlinked
# "current" directory that Capistrano sets up.
working_directory root
# feel free to point this anywhere accessible on the filesystem
pid "#{root}/tmp/pids/unicorn.pid"
# By default, the Unicorn logger will write to stderr.
stderr_path "#{root}/log/unicorn.log"
stdout_path "#{root}/log/unicorn.log"
# listen on a Unix domain socket
listen "/tmp/unicorn.#{app_name}.sock"
# Use at least one worker per core if you're on a dedicated server,
# more will usually help for _short_ waits on databases/caches.
worker_processes 2
# nuke workers after 30 seconds instead of 60 seconds (the default)
timeout 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment