diff --git a/config/runtime.exs b/config/runtime.exs index 883f1345..78bd6fb7 100644 --- a/config/runtime.exs +++ b/config/runtime.exs @@ -120,8 +120,10 @@ if config_env() == :prod do auth: :always # Production endpoint config + {:ok, ip} = :inet.parse_address(System.get_env("APP_IP", "127.0.0.1") |> String.to_charlist()) + config :philomena, PhilomenaWeb.Endpoint, - http: [ip: {127, 0, 0, 1}, port: {:system, "PORT"}], + http: [ip: ip, port: {:system, "PORT"}], url: [host: System.fetch_env!("APP_HOSTNAME"), scheme: "https", port: 443], secret_key_base: System.fetch_env!("SECRET_KEY_BASE"), server: not is_nil(System.get_env("START_ENDPOINT"))