about summary refs log tree commit diff
path: root/config/puma.rb
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2016-03-12 16:09:46 +0100
committerEugen Rochko <eugen@zeonfederated.com>2016-03-12 16:21:53 +0100
commitaab9f57e369c492bad03bcf15411394897314b4d (patch)
treeae8cf704e2b2321993cabf326af82ae0f86b6697 /config/puma.rb
parent447cfef62d74a670ddd600c0240f41746ac2fe0a (diff)
Adding config for puma, dashboard layout, fixing some queries
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