Created
September 16, 2019 21:49
-
-
Save kusakusakusa/cf45a94bfafcbf9b077ed76f1c0db7bb to your computer and use it in GitHub Desktop.
rails puma config for server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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/puma.pid' | |
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' | |
prune_bundler | |
plugin :tmp_restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment