# Should match number of CPU Cores workers {{puma_workers}} # Min and Max threads per worker threads 1, 6 daemonize # Default to production rails_env = "{{be_app_env}}" environment rails_env # Set up socket location bind "unix://{{puma_sockfile}}" # Logging stdout_redirect "{{be_app_path}}/log/puma.log", "{{be_app_path}}/log/puma.log", true # Set master PID and state locations pidfile "{{ puma_pidfile }}" state_path "{{puma_state_path}}" activate_control_app on_worker_boot do require "active_record" ActiveRecord::Base.connection.disconnect! rescue ActiveRecord::ConnectionNotEstablished ActiveRecord::Base.establish_connection(YAML.load_file("{{be_app_path}}/config/database.yml")["{{be_app_env}}"]) end