legendary-doc-site/config/config.exs

103 lines
2.7 KiB
Elixir
Raw Normal View History

2020-07-02 21:08:53 +00:00
use Mix.Config
2020-09-30 21:31:03 +00:00
[
{:admin, Legendary.Admin, false},
2020-09-30 21:31:03 +00:00
{:app, AppWeb, true},
{:core, Legendary.AuthWeb, false},
{:content, Legendary.Content, false},
{:core, Legendary.CoreWeb, false},
2020-09-30 21:31:03 +00:00
]
|> Enum.map(fn {otp_app, module, start_server} ->
endpoint = Module.concat(module, "Endpoint")
error_view = Module.concat(module, "ErrorView")
config otp_app, endpoint,
2020-10-09 22:08:28 +00:00
url: [host: "localhost"],
secret_key_base: "r2eN53mJ9RmlGz9ZQ7xf43P3Or59aaO9rdf5D3hRcsuiH44pGW9kPGfl5mt9N1Gi",
render_errors: [view: error_view, accepts: ~w(html json), layout: false],
pubsub_server: App.PubSub,
live_view: [signing_salt: "g5ltUbnQ"],
server: start_server
2020-09-30 21:31:03 +00:00
end)
[
{:admin, Legendary.Admin.Repo},
2020-09-30 21:31:03 +00:00
{:app, App.Repo},
{:content, Legendary.Content.Repo},
{:core, Legendary.Core.Repo},
2020-09-30 21:31:03 +00:00
]
|> Enum.map(fn
{otp_app, repo} ->
config otp_app,
ecto_repos: [repo],
generators: [context_app: otp_app]
config otp_app, repo,
pool: Legendary.Core.SharedDBConnectionPool
2020-09-30 21:31:03 +00:00
end)
2020-09-30 20:56:22 +00:00
2020-10-09 22:08:28 +00:00
config :core, :pow,
user: Legendary.Auth.User,
repo: Legendary.Core.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: Legendary.AuthWeb.Pow.Mailer,
web_mailer_module: Legendary.AuthWeb,
web_module: Legendary.AuthWeb,
cache_store_backend: Pow.Store.Backend.MnesiaCache
2020-07-17 23:30:31 +00:00
config :core, email_from: "example@example.org"
# Configures Elixir's Logger
config :logger, :console,
2020-10-09 19:32:53 +00:00
level: :debug,
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: Legendary.Content.Repo,
2020-10-09 19:32:53 +00:00
queues: [default: 10],
crontab: [
{"0 * * * *", Legendary.Content.Sitemaps},
2020-09-30 20:56:22 +00:00
]
config :app,
Oban,
repo: App.Repo,
queues: [default: 10],
crontab: [
]
2021-06-18 21:57:11 +00:00
config :mnesia, dir: to_charlist(Path.expand("./priv/mnesia@#{Kernel.node}"))
2021-06-11 19:46:58 +00:00
# Feature flags
config :fun_with_flags, :cache,
enabled: true,
ttl: 300 # seconds
config :fun_with_flags, :persistence,
adapter: FunWithFlags.Store.Persistent.Ecto,
repo: Legendary.Core.Repo
config :fun_with_flags, :cache_bust_notifications,
enabled: true,
adapter: FunWithFlags.Notifications.PhoenixPubSub,
client: App.PubSub
# Notifications can also be disabled, which will also remove the Redis/Redix dependency
config :fun_with_flags, :cache_bust_notifications, [enabled: false]
2020-07-10 19:39:38 +00:00
import_config "email_styles.exs"
import_config "admin.exs"
2020-07-10 19:39:38 +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"