2020-07-02 21:08:53 +00:00
|
|
|
use Mix.Config
|
|
|
|
|
2020-09-30 21:31:03 +00:00
|
|
|
[
|
|
|
|
{:admin, Admin, false},
|
|
|
|
{:app, AppWeb, true},
|
|
|
|
{:auth_web, AuthWeb, false},
|
|
|
|
{:content, Content, false},
|
|
|
|
{:core, CoreWeb, false},
|
|
|
|
]
|
|
|
|
|> Enum.map(fn {otp_app, module, start_server} ->
|
|
|
|
endpoint = Module.concat(module, "Endpoint")
|
|
|
|
error_view = Module.concat(module, "ErrorView")
|
|
|
|
|
|
|
|
config otp_app, endpoint,
|
2020-07-29 17:07:36 +00:00
|
|
|
url: [host: "localhost"],
|
2020-09-30 20:56:22 +00:00
|
|
|
secret_key_base: "r2eN53mJ9RmlGz9ZQ7xf43P3Or59aaO9rdf5D3hRcsuiH44pGW9kPGfl5mt9N1Gi",
|
2020-09-30 21:31:03 +00:00
|
|
|
render_errors: [view: error_view, accepts: ~w(html json), layout: false],
|
2020-07-29 17:07:36 +00:00
|
|
|
pubsub_server: App.PubSub,
|
2020-09-30 21:31:03 +00:00
|
|
|
live_view: [signing_salt: "g5ltUbnQ"],
|
|
|
|
server: start_server
|
|
|
|
end)
|
|
|
|
|
|
|
|
[
|
|
|
|
{:admin, Admin.Repo},
|
|
|
|
{:app, App.Repo},
|
|
|
|
{:auth, Auth.Repo},
|
|
|
|
{:auth_web, Auth.Repo, :auth},
|
|
|
|
{:content, Content.Repo},
|
|
|
|
{:core, Core.Repo},
|
|
|
|
]
|
|
|
|
|> Enum.map(fn
|
|
|
|
{otp_app, repo} ->
|
|
|
|
config otp_app,
|
|
|
|
ecto_repos: [repo],
|
|
|
|
generators: [context_app: otp_app]
|
|
|
|
|
|
|
|
{otp_app, repo, context_app} ->
|
|
|
|
config otp_app,
|
|
|
|
ecto_repos: [repo],
|
|
|
|
generators: [context_app: context_app]
|
|
|
|
end)
|
2020-09-30 20:56:22 +00:00
|
|
|
|
2020-07-17 23:30:31 +00:00
|
|
|
config :auth_web, :pow,
|
2020-07-22 19:22:44 +00:00
|
|
|
user: Auth.User,
|
2020-07-17 23:30:31 +00:00
|
|
|
repo: Auth.Repo,
|
2020-08-22 15:01:04 +00:00
|
|
|
extensions: [PowEmailConfirmation, PowPersistentSession, PowResetPassword],
|
2020-07-17 23:30:31 +00:00
|
|
|
controller_callbacks: Pow.Extension.Phoenix.ControllerCallbacks,
|
|
|
|
mailer_backend: AuthWeb.Pow.Mailer,
|
|
|
|
web_mailer_module: AuthWeb,
|
|
|
|
web_module: AuthWeb
|
|
|
|
|
2020-09-30 20:10:17 +00:00
|
|
|
config :core, email_from: "example@example.org"
|
2020-07-05 17:26:26 +00:00
|
|
|
|
|
|
|
# Configures Elixir's Logger
|
|
|
|
config :logger, :console,
|
2020-10-09 19:32:53 +00:00
|
|
|
level: :debug,
|
2020-07-05 17:26:26 +00:00
|
|
|
format: "$time $metadata[$level] $message\n",
|
|
|
|
metadata: [:request_id]
|
|
|
|
|
|
|
|
# Use Jason for JSON parsing in Phoenix
|
|
|
|
config :phoenix, :json_library, Jason
|
|
|
|
|
2020-07-10 19:39:38 +00:00
|
|
|
config :linguist, pluralization_key: :count
|
|
|
|
|
2020-10-09 19:32:53 +00:00
|
|
|
config :content,
|
|
|
|
Oban,
|
|
|
|
repo: Content.Repo,
|
|
|
|
queues: [default: 10],
|
|
|
|
crontab: [
|
|
|
|
{"0 * * * *", Content.Sitemaps},
|
2020-09-30 20:56:22 +00:00
|
|
|
]
|
|
|
|
|
2020-07-10 19:39:38 +00:00
|
|
|
import_config "email_styles.exs"
|
2020-07-24 22:10:50 +00:00
|
|
|
import_config "admin.exs"
|
2020-07-10 19:39:38 +00:00
|
|
|
|
2020-07-05 17:26:26 +00:00
|
|
|
# Import environment specific config. This must remain at the bottom
|
|
|
|
# of this file so it overrides the configuration defined above.
|
|
|
|
import_config "#{Mix.env()}.exs"
|