Skip to content

Commit ea7b5ba

Browse files
authored
Merge pull request #3 from Intellection/fix-default-puma-threads
Fix the default number of puma threads
2 parents 29afdae + 5ae2759 commit ea7b5ba

7 files changed

Lines changed: 11 additions & 10 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 1.2.0
4+
5+
* Upgrade to Ruby 2.5.0.
6+
* Default `:puma_threads` to 16 if not specified by the `GEMSTASH_PUMA_THREADS` environment variable.
7+
38
## 1.1.0
49

510
* Package gemstash v1.1.0.

CODEOWNERS

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
* @itskingori
2-
* @zacblazic
1+
* @itskingori @tsu-shiuan @zacblazic

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ruby:2.4.1-alpine
1+
FROM ruby:2.5.0-alpine
22

33
# Install system dependencies
44
RUN apk --update add \

app/Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
ruby '2.4.1'
3+
ruby '2.5.0'
44

55
# A simple, fast Mysql library for Ruby, binding to libmysql.
66
gem 'mysql2', '~> 0.4.8'

app/Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ DEPENDENCIES
5858
pg (~> 0.21.0)
5959

6060
RUBY VERSION
61-
ruby 2.4.1p111
61+
ruby 2.5.0p0
6262

6363
BUNDLED WITH
64-
1.15.3
64+
1.16.1

app/config.yml.erb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:base_path: <%= "#{ENV['GEMSTASH_HOME']}/data" %>
22
:cache_type: memory
33
:rubygems_url: https://rubygems.org
4-
:puma_threads: <%= ENV['GEMSTASH_PUMA_THREADS'].to_i %>
4+
:puma_threads: <%= (ENV['GEMSTASH_PUMA_THREADS'] || 16).to_i %>
55
:bind: tcp://0.0.0.0:9292
66
:protected_fetch: false
77
:fetch_timeout: 20
@@ -15,7 +15,6 @@
1515
:adapter: 'mysql2'
1616
:user: <%= ENV['GEMSTASH_DB_USERNAME'] %>
1717
:password: <%= ENV['GEMSTASH_DB_PASSWORD'] %>
18-
:max_connections: <%= ENV['GEMSTASH_PUMA_THREADS'].to_i + 1 %>
1918
<% elsif ENV['GEMSTASH_DB_ADAPTER'] == 'postgres' %>
2019
# postgres adapter
2120
:db_adapter: postgres
@@ -24,7 +23,6 @@
2423
:adapter: 'postgres'
2524
:user: <%= ENV['GEMSTASH_DB_USERNAME'] %>
2625
:password: <%= ENV['GEMSTASH_DB_PASSWORD'] %>
27-
:max_connections: <%= ENV['GEMSTASH_PUMA_THREADS'].to_i + 1 %>
2826
:connect_timeout: 10
2927
:read_timeout: 5
3028
:timeout: 30

docker-compose.sqlite.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ services:
88
image: zappi/gemstash:1.1.0
99
environment:
1010
RACK_ENV: production
11-
GEMSTASH_PUMA_THREADS: 1
1211
ports:
1312
- 9292:9292
1413
volumes:

0 commit comments

Comments
 (0)