Skip to content

Instantly share code, notes, and snippets.

@1990prashant
Created March 25, 2016 07:27
Show Gist options
  • Save 1990prashant/456093aea7d21a7c9aa3 to your computer and use it in GitHub Desktop.
Save 1990prashant/456093aea7d21a7c9aa3 to your computer and use it in GitHub Desktop.
Configuring puma for rails server
gem 'puma'
#this file comes under the config directory
#!/usr/bin/env puma
# start puma with:
# RAILS_ENV=production bundle exec puma -C ./config/puma.rb
application_path = 'app_path/current'
railsenv = 'production'
directory application_path
environment railsenv
daemonize true
pidfile "#{application_path}/tmp/pids/puma-#{railsenv}.pid"
state_path "#{application_path}/tmp/pids/puma-#{railsenv}.state"
stdout_redirect "#{application_path}/log/puma-#{railsenv}.stdout.log", "#{application_path}/log/puma-#{railsenv}.stderr.log"
threads 0, 16
bind "unix:///tmp/app_name.sock"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment