Allow server hostname via ENV

This commit is contained in:
Vamsi Krishna B 2021-07-10 17:35:04 +05:30
parent 1e60ed325c
commit 37e6a4fd95
1 changed files with 7 additions and 0 deletions

View File

@ -33,9 +33,16 @@ zcashd_password =
environment variable ZCASHD_PASSWORD is missing
"""
explorer_hostname =
System.fetch_env!("EXPLORER_HOSTNAME") ||
raise """
environment variable EXPLORER_HOSTNAME is missing
"""
config :zcash_explorer, ZcashExplorerWeb.Endpoint,
http: [
port: String.to_integer(System.get_env("PORT") || "4000"),
host: explorer_hostname,
transport_options: [socket_opts: [:inet6]]
],
secret_key_base: secret_key_base