diff --git a/config/runtime.exs b/config/runtime.exs index 5a0a61dd..4e2d5f0f 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -359,20 +359,18 @@ if config_env() == :prod do # Optional secondary repo for read-only access to aprs.me's database. # Used by APRS-based 144 MHz calibration tooling. When the env var is - # unset we leave the AprsRepo unconfigured; Microwaveprop.Application - # logs a warning and skips starting it, and the rest of the app boots - # normally. + # unset OR an empty string (k8s secret resolves to "") we leave the + # AprsRepo unconfigured; Microwaveprop.Application is the single site + # that logs the skip and decides not to start it. case System.get_env("APRS_DATABASE_URL") do - nil -> - Logger.warning("APRS_DATABASE_URL not set — Microwaveprop.AprsRepo will not start; APRS calibration disabled.") - - :ok - - aprs_url -> + url when is_binary(url) and url != "" -> config :microwaveprop, Microwaveprop.AprsRepo, - url: aprs_url, + url: url, pool_size: String.to_integer(System.get_env("APRS_POOL_SIZE") || "2"), socket_options: maybe_ipv6 + + _ -> + :ok end config :microwaveprop, MicrowavepropWeb.Endpoint,