Skip to content

Instantly share code, notes, and snippets.

@Epigene
Last active October 26, 2015 13:06
Show Gist options
  • Save Epigene/9f039ab2b05e0a8e0e5f to your computer and use it in GitHub Desktop.
Save Epigene/9f039ab2b05e0a8e0e5f to your computer and use it in GitHub Desktop.
Puma auto startup workflow

Set up production puma config file

# in config/puma.rb
app = "shproduct" # App-specific
root = "/home/deployer/apps/#{app}"

workers  6
threads  1, 1

rackup      DefaultRackup
environment "production"
daemonize   true

pidfile "#{root}/shared/tmp/pids/puma.pid"
stdout_redirect "#{root}/shared/log/production.log", "#{root}/shared/log/production_errors.log"
bind "unix:/tmp/puma.socket"

Ensure deployment and manual functionality

mina deploy #=> works?
mina boot #=> works?

Make a wrapper script and add init.d script

https://gist.github.com/Epigene/85a8a2580f096fc52cd4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment