Skip to content

Instantly share code, notes, and snippets.

@Vic-L Vic-L/puma.rb
Created Sep 16, 2019

What would you like to do?
rails puma config for server
# frozen_string_literal: true
max_threads_count = ENV.fetch('RAILS_MAX_THREADS') { 5 }
min_threads_count = ENV.fetch('RAILS_MIN_THREADS') { max_threads_count }
threads min_threads_count, max_threads_count
port ENV.fetch('PORT') { 3000 }
environment ENV.fetch('RAILS_ENV') { 'staging' }
bind 'unix:///home/ubuntu/<SOMETHING>/shared/tmp/sockets/puma.sock'
pidfile '/home/ubuntu/<SOMETHING>/shared/tmp/pids/'
state_path '/home/ubuntu/<SOMETHING>/shared/tmp/sockets/puma.state'
directory '/home/ubuntu/<SOMETHING>/current'
daemonize true
activate_control_app 'unix:///home/ubuntu/<SOMETHING>/shared/tmp/sockets/pumactl.sock'
plugin :tmp_restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.