2021-03-11 21:12:55 -05:00
|
|
|
# In this file, we load production configuration and secrets
|
|
|
|
# from environment variables. You can also hardcode secrets,
|
|
|
|
# although such is generally not recommended and you have to
|
|
|
|
# remember to add this file to your .gitignore.
|
2021-09-04 16:14:51 -04:00
|
|
|
import Config
|
2021-03-11 21:12:55 -05:00
|
|
|
|
|
|
|
database_url =
|
|
|
|
System.get_env("DATABASE_URL") ||
|
2021-09-04 16:54:48 -04:00
|
|
|
"ecto://postgres:postgres@cannery-db/cannery"
|
2021-03-11 21:12:55 -05:00
|
|
|
|
|
|
|
config :cannery, Cannery.Repo,
|
|
|
|
# ssl: true,
|
|
|
|
url: database_url,
|
|
|
|
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10")
|
|
|
|
|
|
|
|
secret_key_base =
|
|
|
|
System.get_env("SECRET_KEY_BASE") ||
|
|
|
|
raise """
|
|
|
|
environment variable SECRET_KEY_BASE is missing.
|
|
|
|
You can generate one by calling: mix phx.gen.secret
|
|
|
|
"""
|
|
|
|
|
2021-09-10 19:17:24 -04:00
|
|
|
host = System.get_env("HOST") || "localhost"
|
|
|
|
|
2021-03-11 21:12:55 -05:00
|
|
|
config :cannery, CanneryWeb.Endpoint,
|
2021-09-10 22:00:35 -04:00
|
|
|
url: [scheme: "https", host: host, port: "443"],
|
2021-03-11 21:12:55 -05:00
|
|
|
http: [
|
2021-09-25 17:01:35 -04:00
|
|
|
port: String.to_integer(System.get_env("PORT") || "4000"),
|
2021-03-11 21:12:55 -05:00
|
|
|
transport_options: [socket_opts: [:inet6]]
|
|
|
|
],
|
2021-09-04 16:14:51 -04:00
|
|
|
secret_key_base: secret_key_base,
|
2021-09-04 16:54:48 -04:00
|
|
|
server: true,
|
|
|
|
registration: System.get_env("REGISTRATION") || "invite"
|