Skip to content

Instantly share code, notes, and snippets.

@alobato
Last active June 23, 2016 16:38
Show Gist options
  • Save alobato/5131682 to your computer and use it in GitHub Desktop.
Save alobato/5131682 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_root = "#{root}/current"
# Help ensure your application will always spawn in the symlinked "current" directory
working_directory current_root
# feel free to point this anywhere accessible on the filesystem
pid "#{root}/shared/pids/unicorn.pid"
# By default, the Unicorn logger will write to stderr
stderr_path "#{root}/shared/log/unicorn.log"
stdout_path "#{root}/shared/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