-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathdev.exs
101 lines (83 loc) · 3.56 KB
/
dev.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
import Config
# For local work, it is usually more convenient to copy-paste
config :unlock,
config_fetcher: Unlock.Config.Disk,
disk_config_file: Path.join(__DIR__, "proxy-config.yml")
config :transport, TransportWeb.Endpoint,
# http: is configured via config/runtime.exs (PORT)
debug_errors: true,
# If you want to test persistence of forms across deploys in development,
# make sure to set code_reloader to false.
# see https://hexdocs.pm/phoenix_live_view/form-bindings.html#recovery-following-crashes-or-disconnects
# for the detailed explanation.
code_reloader: true,
check_origin: false,
# NOTE: this is required to ensure code reloading will work.
# A page reload is required to trigger this. More apps could
# be added when needed here, we just added what we needed.
reloadable_apps: [:shared, :transport, :unlock]
# Uncomment this to avoid having to restart the app for each change in description
# See https://github.com/open-api-spex/open_api_spex#serve-the-spec
# config :open_api_spex, :cache_adapter, OpenApiSpex.Plug.NoneCache
# watchers are also configured via config/runtime.exs
config :transport, TransportWeb.Endpoint,
live_reload: [
url: "ws://127.0.0.1:5000",
patterns: [
~r{priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$},
~r{priv/gettext/.*(po)$},
~r{lib/transport_web/views/.*(ex)$},
~r{lib/transport_web/templates/.*(eex|md)$},
~r{lib/transport_web/live/.*(ex)$}
]
]
# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"
# Set a higher stacktrace during development. Avoid configuring such
# in production as building large stacktraces may be expensive.
config :phoenix, :stacktrace_depth, 20
# Swap out some implementations in developement to ease setup and
# integration with third party services.
#
# Edit the following lines if you want to use another implementation.
# You can use dev.secret.exs (out of git) if you need to set secrets
# as often done.
# Provide a default experience that will mostly work without manual config,
# as long as the developer does not use advanced features (backoffice login, gbfs etc)
# One can use dev.secret.exs to override this.
secret_key_base = "lrS928IORjEwtIIdxjRZ30I8PUR4rbXorGCfmA4nbX2Jkgjl7U9rpcz6QjjH1AOc"
config :transport, TransportWeb.Endpoint,
secret_key_base: secret_key_base,
live_view: [
# NOTE: unsure if this is actually great to reuse the same value
signing_salt: secret_key_base
],
export_secret_key: System.get_env("EXPORT_SECRET_KEY", "TwqrkD06AWp1uKGcBTck")
datagouvfr_site = "https://demo.data.gouv.fr"
config :transport,
datagouvfr_site: datagouvfr_site,
s3_buckets: %{
history: "resource-history-dev",
on_demand_validation: "on-demand-validation-dev",
gtfs_diff: "gtfs-diff-dev",
logos: "logos-dev",
aggregates: "aggregates-dev"
}
config :oauth2, Datagouvfr.Authentication,
site: datagouvfr_site,
redirect_uri: "http://localhost:5000/login/callback"
# Allows emails to be read at localhost:5000/dev/mailbox
# Add a dev.secret.exs to use a real email provider
config :transport, Transport.Mailer, adapter: Swoosh.Adapters.Local
extra_config_file = Path.join(__DIR__, "#{config_env()}.secret.exs")
if File.exists?(extra_config_file) do
import_config extra_config_file
else
require Logger
Logger.warning(
"Only the most basic features will work. Please create #{extra_config_file} based on config/dev.secret.template.exs for more advanced use."
)
end
if File.exists?(".envrc") do
Mix.raise("The .envrc file is deprecated and must be removed")
end