about summary refs log tree commit diff
path: root/config/puma.rb
diff options
context:
space:
mode:
Diffstat (limited to 'config/puma.rb')
-rw-r--r--config/puma.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/config/puma.rb b/config/puma.rb
new file mode 100644
index 000000000..49f4b974d
--- /dev/null
+++ b/config/puma.rb
@@ -0,0 +1,13 @@
+workers Integer(ENV['WEB_CONCURRENCY'] || 2)
+threads_count = Integer(ENV['MAX_THREADS'] || 5)
+threads threads_count, threads_count
+
+preload_app!
+
+rackup      DefaultRackup
+port        ENV['PORT']     || 3000
+environment ENV['RACK_ENV'] || 'development'
+
+on_worker_boot do
+  ActiveRecord::Base.establish_connection
+end