Replies: 1 comment
-
This looks fine to me, but it did make me consider why #!/usr/bin/env -S falcon host
# frozen_string_literal: true
require "falcon/environment/rack"
hostname = File.basename(__dir__)
service hostname do
include Falcon::Environment::Rack
# By default, Falcon uses Etc.nprocessors to set the count, which is likely incorrect on shared hosts like Heroku.
# Review the following for guidance about how to find the right value for your app:
# https://help.heroku.com/88G3XLA6/what-is-an-acceptable-amount-of-dyno-load
# https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#workers
count ENV.fetch("WEB_CONCURRENCY", 1).to_i
# If using count > 1 you may want to preload your app to reduce memory usage and increase performance:
# This file will be loaded in the main process before forking.
preload "preload.rb"
cache false
verbose true
port {ENV.fetch("PORT", 3000).to_i}
endpoint {Async::HTTP::Endpoint.parse("http://0.0.0.0:#{port}")}
end (The last two |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, I’m migrating an I/O-bound application from Puma to Falcon.
I’ve followed the official guide locally, but I’m wondering if there’s anything specific that needs to be configured in Kamal for deployment. Also i am using Net::HTTP to make my HTTP calls, should i move to Async::HTTP ?
config/deploy.yml:
falcon.rb:
Dockerfile:
CMD ["bundle", "exec", "falcon", "host"]
bin/docker-entrypoint:
Thanks
Beta Was this translation helpful? Give feedback.
All reactions