Sha256: c81ff93a953f6b613c8dafa5a095fdd3763a81d969f3f50115f5f98158a12bff

Contents?: true

Size: 791 Bytes

Versions: 33

Compression:

Stored size: 791 Bytes

Contents

development = ENV.fetch("HANAMI_ENV", "development") == "development"

require "concurrent"
require "localhost" if development

Bundler.require :tools if development
Bundler.root.join("tmp").then { |path| path.mkdir unless path.exist? }

max_threads = ENV.fetch "HANAMI_MAX_THREADS", 5
min_threads = ENV.fetch "HANAMI_MIN_THREADS", max_threads
concurrency = ENV.fetch "HANAMI_WEB_CONCURRENCY", Concurrent.physical_processor_count

threads min_threads, max_threads
port ENV.fetch "HANAMI_PORT", 2300
environment ENV.fetch "HANAMI_ENV", "development"
workers concurrency
worker_timeout 3600 if development
ssl_bind "localhost", 2443 if development
pidfile ENV.fetch "PIDFILE", "tmp/server.pid"
plugin :tmp_restart

preload_app! && before_fork { Hanami.shutdown } if concurrency.to_i.positive?

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
hanamismith-1.4.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-1.3.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-1.2.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-1.1.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-1.0.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.50.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.49.1 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.49.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.48.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.47.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.46.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.45.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.44.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.43.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.42.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.41.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.40.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.39.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.38.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb
hanamismith-0.37.0 lib/hanamismith/templates/%project_name%/config/puma.rb.erb