Skip to content

Commit

Permalink
falcon config
Browse files Browse the repository at this point in the history
  • Loading branch information
michelson committed Feb 25, 2024
1 parent ed08c9e commit f935025
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,12 @@ group :test do
gem "database_cleaner-active_record"
gem "database_cleaner-redis"
gem "factory_bot_rails"
gem "falcon-capybara"
gem "rubocop", require: false
gem "rubocop-performance", require: false
gem "rubocop-rails", require: false
gem "rubocop-rspec", require: false
gem "selenium-webdriver"
gem "shoulda"
gem "shoulda-matchers"
gem "webmock"
Expand Down
12 changes: 12 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,10 @@ GEM
process-metrics (~> 0.2.0)
protocol-rack (~> 0.1)
samovar (~> 2.1)
falcon-capybara (1.5.2)
capybara (~> 3.37)
falcon (~> 0.34)
selenium-webdriver
faraday (1.10.3)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
Expand Down Expand Up @@ -739,6 +743,11 @@ GEM
searchkick (5.3.0)
activemodel (>= 6.1)
hashie
selenium-webdriver (4.18.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2, < 3.0)
websocket (~> 1.0)
shoulda (4.0.0)
shoulda-context (~> 2.0)
shoulda-matchers (~> 4.0)
Expand Down Expand Up @@ -834,6 +843,7 @@ GEM
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.1)
websocket (1.2.10)
websocket-driver (0.7.6)
websocket-extensions (>= 0.1.0)
websocket-driver (0.7.6-java)
Expand Down Expand Up @@ -887,6 +897,7 @@ DEPENDENCIES
factory_bot_rails
faker!
falcon
falcon-capybara
faraday
fast_page (~> 0.1.5)
friendly_id (~> 5.2)
Expand Down Expand Up @@ -950,6 +961,7 @@ DEPENDENCIES
sassc
scout_apm
searchkick
selenium-webdriver
shoulda
shoulda-matchers
sidekiq
Expand Down
16 changes: 16 additions & 0 deletions falcon.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/env -S falcon host
# frozen_string_literal: true

load :rack

hostname = File.basename(__dir__)
port = ENV["PORT"] || 3000

rack hostname do
append preload "preload.rb"

cache false
verbose true
count ENV.fetch("RAILS_MAX_THREADS", 5) # ENV.fetch("FALCON_COUNT", 1).to_i
endpoint Async::HTTP::Endpoint.parse("http://0.0.0.0:#{port}").with(protocol: Async::HTTP::Protocol::HTTP11)
end
1 change: 1 addition & 0 deletions preload.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require_relative "config/environment"

0 comments on commit f935025

Please sign in to comment.