Skip to content

Commit d6776b2

Browse files
committed
switch to falcon
1 parent 7f989e3 commit d6776b2

File tree

3 files changed

+102
-35
lines changed

3 files changed

+102
-35
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
77
gem 'rails', '~> 7'
88
# Use postgresql as the database for Active Record
99
gem 'pg', '>= 0.18', '< 2.0'
10-
# Use Puma as the app server
11-
gem 'puma', '~> 6.3'
10+
# Use falcon as webserver
11+
gem 'falcon'
1212
# Use SCSS for stylesheets
1313
gem 'sass-rails', '~> 6.0'
1414
# Use Uglifier as compressor for JavaScript assets

Gemfile.lock

Lines changed: 68 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,29 @@ GEM
9191
ar-uuid (0.2.3)
9292
activerecord
9393
ast (2.4.2)
94+
async (2.11.0)
95+
console (~> 1.25, >= 1.25.2)
96+
fiber-annotation
97+
io-event (~> 1.5, >= 1.5.1)
98+
timers (~> 4.1)
99+
async-container (0.18.2)
100+
async (~> 2.10)
101+
async-http (0.66.3)
102+
async (>= 2.10.2)
103+
async-pool (>= 0.6.1)
104+
io-endpoint (~> 0.10, >= 0.10.3)
105+
io-stream (~> 0.4)
106+
protocol-http (~> 0.26.0)
107+
protocol-http1 (~> 0.19.0)
108+
protocol-http2 (~> 0.17.0)
109+
traces (>= 0.10.0)
110+
async-http-cache (0.4.3)
111+
async-http (~> 0.56)
112+
async-pool (0.6.1)
113+
async (>= 1.25)
114+
async-service (0.12.0)
115+
async
116+
async-container (~> 0.16)
94117
base32-crockford (0.1.0)
95118
base64 (0.2.0)
96119
bcrypt (3.1.20)
@@ -118,6 +141,10 @@ GEM
118141
colored2 (3.1.2)
119142
concurrent-ruby (1.2.3)
120143
connection_pool (2.4.1)
144+
console (1.25.2)
145+
fiber-annotation
146+
fiber-local (~> 1.1)
147+
json
121148
cork (0.3.0)
122149
colored2 (~> 3.1)
123150
crass (1.0.6)
@@ -176,6 +203,18 @@ GEM
176203
railties (>= 5.0.0)
177204
faker (3.3.1)
178205
i18n (>= 1.8.11, < 2)
206+
falcon (0.47.6)
207+
async
208+
async-container (~> 0.18)
209+
async-http (~> 0.66, >= 0.66.3)
210+
async-http-cache (~> 0.4.0)
211+
async-service (~> 0.10)
212+
bundler
213+
localhost (~> 1.1)
214+
openssl (~> 3.0)
215+
process-metrics (~> 0.2.0)
216+
protocol-rack (~> 0.5)
217+
samovar (~> 2.3)
179218
faraday (2.9.0)
180219
faraday-net_http (>= 2.0, < 3.2)
181220
faraday-http-cache (2.5.1)
@@ -186,6 +225,10 @@ GEM
186225
faraday (~> 2.0)
187226
ffaker (2.23.0)
188227
ffi (1.16.3)
228+
fiber-annotation (0.2.0)
229+
fiber-local (1.1.0)
230+
fiber-storage
231+
fiber-storage (0.1.1)
189232
fugit (1.11.0)
190233
et-orbi (~> 1, >= 1.2.11)
191234
raabro (~> 1.4)
@@ -218,6 +261,9 @@ GEM
218261
i18n (1.14.5)
219262
concurrent-ruby (~> 1.0)
220263
io-console (0.7.2)
264+
io-endpoint (0.10.3)
265+
io-event (1.5.1)
266+
io-stream (0.4.0)
221267
irb (1.13.1)
222268
rdoc (>= 4.0.0)
223269
reline (>= 0.4.2)
@@ -233,6 +279,7 @@ GEM
233279
listen (3.8.0)
234280
rb-fsevent (~> 0.10, >= 0.10.3)
235281
rb-inotify (~> 0.9, >= 0.9.10)
282+
localhost (1.3.1)
236283
loofah (2.22.0)
237284
crass (~> 1.0.2)
238285
nokogiri (>= 1.12.0)
@@ -241,6 +288,7 @@ GEM
241288
net-imap
242289
net-pop
243290
net-smtp
291+
mapping (1.1.1)
244292
marcel (1.0.4)
245293
matrix (0.4.2)
246294
method_source (1.1.0)
@@ -276,6 +324,7 @@ GEM
276324
faraday (>= 1, < 3)
277325
sawyer (~> 0.9)
278326
open4 (1.3.4)
327+
openssl (3.2.0)
279328
orm_adapter (0.5.0)
280329
paper_trail (15.1.0)
281330
activerecord (>= 6.1)
@@ -285,6 +334,19 @@ GEM
285334
ast (~> 2.4.1)
286335
racc
287336
pg (1.5.6)
337+
process-metrics (0.2.1)
338+
console (~> 1.8)
339+
samovar (~> 2.1)
340+
protocol-hpack (1.4.3)
341+
protocol-http (0.26.5)
342+
protocol-http1 (0.19.1)
343+
protocol-http (~> 0.22)
344+
protocol-http2 (0.17.0)
345+
protocol-hpack (~> 1.4)
346+
protocol-http (~> 0.18)
347+
protocol-rack (0.5.1)
348+
protocol-http (~> 0.23)
349+
rack (>= 1.0)
288350
pry (0.14.2)
289351
coderay (~> 1.1)
290352
method_source (~> 1.0)
@@ -294,8 +356,6 @@ GEM
294356
psych (5.1.2)
295357
stringio
296358
public_suffix (5.0.5)
297-
puma (6.4.2)
298-
nio4r (~> 2.0)
299359
raabro (1.4.0)
300360
racc (1.8.0)
301361
rack (3.0.11)
@@ -400,6 +460,9 @@ GEM
400460
rubyzip (2.3.2)
401461
rufus-scheduler (3.9.1)
402462
fugit (~> 1.1, >= 1.1.6)
463+
samovar (2.3.0)
464+
console (~> 1.0)
465+
mapping (~> 1.0)
403466
sass-rails (6.0.0)
404467
sassc-rails (~> 2.1, >= 2.1.1)
405468
sassc (2.4.0)
@@ -447,6 +510,8 @@ GEM
447510
thor (1.3.1)
448511
tilt (2.3.0)
449512
timeout (0.4.1)
513+
timers (4.3.5)
514+
traces (0.11.1)
450515
trailblazer-option (0.1.2)
451516
tzinfo (2.0.6)
452517
concurrent-ruby (~> 1.0)
@@ -489,6 +554,7 @@ DEPENDENCIES
489554
devise
490555
factory_bot_rails
491556
faker
557+
falcon
492558
faraday-retry
493559
ffaker
494560
grape
@@ -501,7 +567,6 @@ DEPENDENCIES
501567
paper_trail
502568
pg (>= 0.18, < 2.0)
503569
pry-byebug
504-
puma (~> 6.3)
505570
rails (~> 7)
506571
redis (~> 5.0)
507572
rspec-rails

config/puma.rb

Lines changed: 32 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
# frozen_string_literal: true
22

3-
# Puma can serve each request in a thread from an internal thread pool.
4-
# The `threads` method setting takes two numbers: a minimum and maximum.
5-
# Any libraries that use thread pools should be configured to match
6-
# the maximum value specified for Puma. Default is set to 5 threads for minimum
7-
# and maximum; this matches the default thread size of Active Record.
8-
#
9-
threads_count = ENV.fetch('RAILS_MAX_THREADS', 5)
10-
threads threads_count, threads_count
3+
# uncomment everything below if you are using puma
114

12-
# Specifies the `port` that Puma will listen on to receive requests;
13-
# default is 3000.
14-
#
15-
port ENV.fetch('PORT', 3000)
5+
# # Puma can serve each request in a thread from an internal thread pool.
6+
# # The `threads` method setting takes two numbers: a minimum and maximum.
7+
# # Any libraries that use thread pools should be configured to match
8+
# # the maximum value specified for Puma. Default is set to 5 threads for minimum
9+
# # and maximum; this matches the default thread size of Active Record.
10+
# #
11+
# threads_count = ENV.fetch('RAILS_MAX_THREADS', 5)
12+
# threads threads_count, threads_count
1613

17-
# Specifies the `environment` that Puma will run in.
18-
#
19-
environment ENV.fetch('RAILS_ENV', 'development')
14+
# # Specifies the `port` that Puma will listen on to receive requests;
15+
# # default is 3000.
16+
# #
17+
# port ENV.fetch('PORT', 3000)
2018

21-
# Specifies the number of `workers` to boot in clustered mode.
22-
# Workers are forked webserver processes. If using threads and workers together
23-
# the concurrency of the application would be max `threads` * `workers`.
24-
# Workers do not work on JRuby or Windows (both of which do not support
25-
# processes).
26-
#
27-
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
19+
# # Specifies the `environment` that Puma will run in.
20+
# #
21+
# environment ENV.fetch('RAILS_ENV', 'development')
2822

29-
# Use the `preload_app!` method when specifying a `workers` number.
30-
# This directive tells Puma to first boot the application and load code
31-
# before forking the application. This takes advantage of Copy On Write
32-
# process behavior so workers use less memory.
33-
#
34-
# preload_app!
23+
# # Specifies the number of `workers` to boot in clustered mode.
24+
# # Workers are forked webserver processes. If using threads and workers together
25+
# # the concurrency of the application would be max `threads` * `workers`.
26+
# # Workers do not work on JRuby or Windows (both of which do not support
27+
# # processes).
28+
# #
29+
# # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
3530

36-
# Allow puma to be restarted by `rails restart` command.
37-
plugin :tmp_restart
31+
# # Use the `preload_app!` method when specifying a `workers` number.
32+
# # This directive tells Puma to first boot the application and load code
33+
# # before forking the application. This takes advantage of Copy On Write
34+
# # process behavior so workers use less memory.
35+
# #
36+
# # preload_app!
37+
38+
# # Allow puma to be restarted by `rails restart` command.
39+
# plugin :tmp_restart

0 commit comments

Comments
 (0)