mirror of
https://github.com/philomena-dev/philomena.git
synced 2024-11-23 20:18:00 +01:00
set prod ip via env var
This commit is contained in:
parent
8c7f633b18
commit
38b3f482ec
1 changed files with 3 additions and 1 deletions
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue