mirror of
https://github.com/postalserver/postal.git
synced 2026-10-18 18:26:06 +00:00
feat: new configuration system (and schema) (#2819)
This commit is contained in:
+5
-4
@@ -1,11 +1,12 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
require_relative "../lib/postal/config"
|
||||
threads_count = Postal.config.web_server&.max_threads&.to_i || 5
|
||||
|
||||
threads_count = Postal::Config.web_server.max_threads
|
||||
threads threads_count, threads_count
|
||||
bind_address = Postal.config.web_server&.bind_address || "127.0.0.1"
|
||||
bind_port = Postal.config.web_server&.port&.to_i || ENV["PORT"] || 5000
|
||||
bind_address = ENV.fetch("BIND_ADDRESS", Postal::Config.web_server.default_bind_address)
|
||||
bind_port = ENV.fetch("PORT", Postal::Config.web_server.default_port)
|
||||
bind "tcp://#{bind_address}:#{bind_port}"
|
||||
environment Postal.config.rails&.environment || "development"
|
||||
environment Postal::Config.rails.environment || "development"
|
||||
prune_bundler
|
||||
quiet false
|
||||
|
||||
Reference in New Issue
Block a user