Skip to content

Instantly share code, notes, and snippets.

@rockstar2046
Last active May 26, 2016 10:35
Show Gist options
  • Save rockstar2046/7cff688089b068a6ed9c to your computer and use it in GitHub Desktop.
Save rockstar2046/7cff688089b068a6ed9c to your computer and use it in GitHub Desktop.
unicorn config file
# Set the working application directory
work_path=ENV["WORK_PATH"]
# App path (current dir)
app_path=`pwd`.gsub "\n", ""
puts "work_path: #{work_path}"
puts "app_path: #{app_path}"
# working_directory "/path/to/your/app"
working_directory app_path
# Unicorn PID file location
# pid "/path/to/pids/unicorn.pid"
pid "#{work_path}/unicorn.pid"
# Path to logs
stderr_path "#{work_path}/log/error.unicorn.log"
stdout_path "#{work_path}/log/out.unicorn.log"
# Unicorn socket
listen "#{work_path}/unicorn.sock"
#listen 4000
# Number of processes
worker_processes 4
#worker_processes 2
# Time-out
timeout 30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment