2019-10-05 19:07:50 +02:00
|
|
|
import Config
|
|
|
|
|
|
|
|
import_config "dev.exs"
|
|
|
|
|
2020-01-26 21:36:50 +01:00
|
|
|
config :mobilizon, Mobilizon.Web.Endpoint,
|
2019-10-05 19:07:50 +02:00
|
|
|
http: [
|
|
|
|
port: 4000
|
|
|
|
],
|
|
|
|
url: [
|
|
|
|
host: "localhost",
|
|
|
|
port: 4000,
|
|
|
|
scheme: "http"
|
|
|
|
],
|
|
|
|
debug_errors: true,
|
|
|
|
code_reloader: false,
|
|
|
|
check_origin: false,
|
2020-02-18 08:57:00 +01:00
|
|
|
# Somehow this can't be merged properly with the dev config so we got this…
|
2019-10-05 19:07:50 +02:00
|
|
|
watchers: [
|
|
|
|
yarn: [cd: Path.expand("../js", __DIR__)]
|
|
|
|
]
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
require Logger
|
2019-10-05 19:07:50 +02:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
cond do
|
|
|
|
System.get_env("INSTANCE_CONFIG") &&
|
|
|
|
File.exists?("./config/#{System.get_env("INSTANCE_CONFIG")}") ->
|
|
|
|
import_config System.get_env("INSTANCE_CONFIG")
|
|
|
|
|
|
|
|
System.get_env("DOCKER", "false") == "false" && File.exists?("./config/e2e.secret.exs") ->
|
|
|
|
import_config "e2e.secret.exs"
|
|
|
|
|
|
|
|
System.get_env("DOCKER", "false") == "true" ->
|
|
|
|
Logger.info("Using environment configuration for Docker")
|
|
|
|
|
|
|
|
true ->
|
|
|
|
Logger.error("No configuration file found")
|
|
|
|
end
|