Use password from environment
This commit is contained in:
@@ -11,6 +11,8 @@ config :music_library,
|
||||
ecto_repos: [MusicLibrary.Repo],
|
||||
generators: [timestamp_type: :utc_datetime, binary_id: true]
|
||||
|
||||
config :music_library, MusicLibraryWeb, auth_password: "change me"
|
||||
|
||||
# Configures the endpoint
|
||||
config :music_library, MusicLibraryWeb.Endpoint,
|
||||
url: [host: "localhost"],
|
||||
|
||||
@@ -44,9 +44,17 @@ if config_env() == :prod do
|
||||
You can generate one by calling: mix phx.gen.secret
|
||||
"""
|
||||
|
||||
auth_password =
|
||||
System.get_env("AUTH_PASSWORD") ||
|
||||
raise """
|
||||
environment variable AUTH_PASSWORD is missing.
|
||||
"""
|
||||
|
||||
host = System.get_env("PHX_HOST") || "example.com"
|
||||
port = String.to_integer(System.get_env("PORT") || "4000")
|
||||
|
||||
config :music_library, MusicLibraryWeb, auth_password: auth_password
|
||||
|
||||
config :music_library, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
||||
|
||||
config :music_library, MusicLibraryWeb.Endpoint,
|
||||
|
||||
Reference in New Issue
Block a user