2021-10-19 19:28:25 +00:00
|
|
|
import Config
|
2020-07-05 17:26:26 +00:00
|
|
|
|
2020-07-29 17:07:36 +00:00
|
|
|
# For development, we disable any cache and enable
|
|
|
|
# debugging and code reloading.
|
|
|
|
#
|
|
|
|
# The watchers configuration can be used to run external
|
|
|
|
# watchers to your application. For example, we use it
|
|
|
|
# with webpack to recompile .js and .css sources.
|
2020-09-30 21:31:03 +00:00
|
|
|
[
|
2021-03-19 19:32:18 +00:00
|
|
|
{:admin, Legendary.Admin},
|
2020-09-30 21:31:03 +00:00
|
|
|
{:app, AppWeb},
|
2021-03-19 19:32:18 +00:00
|
|
|
{:core, Legendary.AuthWeb},
|
|
|
|
{:content, Legendary.Content},
|
|
|
|
{:core, Legendary.CoreWeb},
|
2021-10-19 19:28:25 +00:00
|
|
|
{:object_storage, Legendary.ObjectStorageWeb}
|
2020-09-30 21:31:03 +00:00
|
|
|
]
|
|
|
|
|> Enum.map(fn {otp_app, module} ->
|
|
|
|
config otp_app, Module.concat(module, "Endpoint"),
|
2021-06-18 21:57:11 +00:00
|
|
|
http: [port: String.to_integer(System.get_env("PORT") || "4000")],
|
2020-09-30 21:31:03 +00:00
|
|
|
debug_errors: true,
|
|
|
|
code_reloader: true,
|
|
|
|
check_origin: false,
|
|
|
|
watchers: [
|
|
|
|
node: [
|
|
|
|
"node_modules/webpack/bin/webpack.js",
|
|
|
|
"--mode",
|
|
|
|
"development",
|
2021-06-29 00:49:20 +00:00
|
|
|
"--watch",
|
|
|
|
"--watch-options-stdin",
|
2021-07-19 21:27:47 +00:00
|
|
|
"--progress",
|
2020-09-30 21:31:03 +00:00
|
|
|
cd: Path.expand("../apps/#{otp_app}/assets", __DIR__)
|
|
|
|
]
|
2020-07-29 17:07:36 +00:00
|
|
|
]
|
|
|
|
|
2021-06-18 21:57:11 +00:00
|
|
|
config otp_app, AppWeb.Endpoint,
|
2020-09-30 21:31:03 +00:00
|
|
|
live_reload: [
|
|
|
|
patterns: [
|
|
|
|
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
|
|
|
|
~r"priv/gettext/.*(po)$",
|
2021-06-18 21:57:11 +00:00
|
|
|
~r"(live|views)/.*(ex)$",
|
|
|
|
~r"templates/.*(eex)$"
|
2020-09-30 21:31:03 +00:00
|
|
|
]
|
2020-09-30 20:56:22 +00:00
|
|
|
]
|
2020-09-30 21:31:03 +00:00
|
|
|
end)
|
|
|
|
|
|
|
|
[
|
2021-03-19 19:32:18 +00:00
|
|
|
{:admin, Legendary.Admin.Repo},
|
2020-09-30 21:31:03 +00:00
|
|
|
{:app, App.Repo},
|
2021-03-19 19:32:18 +00:00
|
|
|
{:content, Legendary.Content.Repo},
|
2021-10-19 19:28:25 +00:00
|
|
|
{:core, Legendary.Core.Repo},
|
|
|
|
{:object_storage, Legendary.ObjectStorage.Repo}
|
2020-09-30 21:31:03 +00:00
|
|
|
]
|
|
|
|
|> Enum.map(fn {otp_app, repo} ->
|
|
|
|
config otp_app, repo,
|
|
|
|
username: "postgres",
|
|
|
|
password: "postgres",
|
|
|
|
database: "legendary_dev",
|
|
|
|
hostname: "localhost",
|
|
|
|
show_sensitive_data_on_connection_error: true,
|
|
|
|
pool_size: 10
|
|
|
|
end)
|
2020-09-30 20:56:22 +00:00
|
|
|
|
2021-03-19 19:32:18 +00:00
|
|
|
config :core, Legendary.CoreMailer, adapter: Bamboo.LocalAdapter
|
2020-07-05 17:26:26 +00:00
|
|
|
|
2021-05-28 17:38:37 +00:00
|
|
|
config :libcluster,
|
|
|
|
topologies: [
|
2021-05-28 20:36:05 +00:00
|
|
|
erlang_hosts: [
|
2021-10-19 19:28:25 +00:00
|
|
|
strategy: Elixir.Cluster.Strategy.Gossip
|
2021-05-28 17:38:37 +00:00
|
|
|
]
|
|
|
|
]
|
|
|
|
|
2021-10-19 19:28:25 +00:00
|
|
|
# Use this configuration to use Waffle with our internal object storage engine
|
|
|
|
# that simulates S3
|
|
|
|
config :waffle,
|
|
|
|
storage: Waffle.Storage.S3,
|
|
|
|
bucket: "uploads",
|
|
|
|
asset_host: "http://localhost:4000"
|
|
|
|
|
2020-07-05 17:26:26 +00:00
|
|
|
# ## SSL Support
|
|
|
|
#
|
|
|
|
# In order to use HTTPS in development, a self-signed
|
|
|
|
# certificate can be generated by running the following
|
|
|
|
# Mix task:
|
|
|
|
#
|
|
|
|
# mix phx.gen.cert
|
|
|
|
#
|
|
|
|
# Note that this task requires Erlang/OTP 20 or later.
|
|
|
|
# Run `mix help phx.gen.cert` for more information.
|
|
|
|
#
|
|
|
|
# The `http:` config above can be replaced with:
|
|
|
|
#
|
|
|
|
# https: [
|
|
|
|
# port: 4001,
|
|
|
|
# cipher_suite: :strong,
|
|
|
|
# keyfile: "priv/cert/selfsigned_key.pem",
|
|
|
|
# certfile: "priv/cert/selfsigned.pem"
|
|
|
|
# ],
|
|
|
|
#
|
|
|
|
# If desired, both `http:` and `https:` keys can be
|
|
|
|
# configured to run both http and https servers on
|
|
|
|
# different ports.
|
2021-10-19 19:28:25 +00:00
|
|
|
|
|
|
|
config :object_storage,
|
|
|
|
bucket_name: "uploads"
|
|
|
|
|
|
|
|
config :ex_aws,
|
|
|
|
access_key_id: "dev-test-access-key-id",
|
|
|
|
secret_access_key: "dev-test-secret-access-key"
|
|
|
|
|
|
|
|
config :ex_aws, :s3,
|
|
|
|
scheme: "http://",
|
|
|
|
host: "localhost",
|
|
|
|
port: 4000
|