@@ -3,6 +3,7 @@ source 'https://rubygems.org'
gem 'json', '~> 2.8'
gem 'sequel', '~> 5.0'
gem 'rack', '~> 3.1'
+gem "concurrent-ruby"
group :mysql, optional: true do
gem 'trilogy', '~> 2.9', platforms: [:ruby, :windows]
@@ -2,6 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
bigdecimal (3.1.9)
+ concurrent-ruby (1.3.5)
json (2.13.2)
nio4r (2.7.4)
pg (1.5.9)
@@ -21,6 +22,7 @@ PLATFORMS
x86_64-linux
DEPENDENCIES
+ concurrent-ruby
json (~> 2.8)
pg (~> 1.5)
puma (~> 7.0)
@@ -1,9 +1,8 @@
require_relative 'auto_tune'
# FWBM only... use the puma_auto_tune gem in production!
-num_workers, num_threads = auto_tune
+_, num_threads = auto_tune
-workers num_workers
threads num_threads, num_threads
before_fork do
@@ -16,6 +16,7 @@ RUN bundle install --jobs=4 --gemfile=/rack-sequel/Gemfile
ENV DBTYPE=postgresql
+ENV WEB_CONCURRENCY=auto
EXPOSE 8080
CMD bundle exec puma -C config/mri_puma.rb -b tcp://0.0.0.0:8080 -e production
ENV DBTYPE=mysql