Created
February 17, 2017 10:19
-
-
Save argent-smith/b8f05b3b18f070ee23c88ed462d4cfa3 to your computer and use it in GitHub Desktop.
puma config template
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
#!/usr/bin/env puma | |
require "pathname" | |
_num_workers = {{ ansible_processor_vcpus }} | |
_working_dir = Pathname.new("{{ deploy_to }}/current") | |
_rails_env = "{{ rails_env }}" | |
workers _num_workers | |
directory _working_dir.to_s | |
rackup _working_dir.join("config.ru").to_s | |
environment _rails_env | |
daemonize false | |
pidfile _working_dir.join("tmp/pids/puma.pid").to_s | |
state_path _working_dir.join("tmp/pids/puma.state").to_s | |
threads 0,{{ puma_max_threads }} | |
bind "unix://{{ deploy_to }}/shared/tmp/sockets/puma.sock" | |
on_restart do | |
puts "On restart..." | |
end | |
on_worker_boot do | |
puts "On worker boot..." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment