1
0
مراية لـ https://github.com/postalserver/postal.git تم المزامنة 2026-01-16 21:23:37 +00:00

feat: new configuration system (and schema) (#2819)

هذا الالتزام موجود في:
Adam Cooke
2024-02-26 12:41:57 +00:00
ملتزم من قبل GitHub
الأصل 1c5ff5a9a6
التزام 0163ac3d10
77 ملفات معدلة مع 1840 إضافات و593 حذوفات

عرض الملف

@@ -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