19
config/config.exs
Normal file
19
config/config.exs
Normal file
@@ -0,0 +1,19 @@
|
||||
import Config
|
||||
|
||||
config :bds,
|
||||
ecto_repos: [BDS.Repo]
|
||||
|
||||
config :bds, BDS.Repo,
|
||||
database: Path.expand("../priv/data/bds_dev.db", __DIR__),
|
||||
pool_size: 5,
|
||||
stacktrace: true,
|
||||
show_sensitive_data_on_connection_error: true
|
||||
|
||||
config :bds, BDS.Application,
|
||||
desktop_adapter: :pending_selection
|
||||
|
||||
config :logger, :console,
|
||||
format: "$time $metadata[$level] $message\n",
|
||||
metadata: [:request_id]
|
||||
|
||||
import_config "#{config_env()}.exs"
|
||||
4
config/dev.exs
Normal file
4
config/dev.exs
Normal file
@@ -0,0 +1,4 @@
|
||||
import Config
|
||||
|
||||
config :bds, BDS.Repo,
|
||||
pool_size: 5
|
||||
11
config/runtime.exs
Normal file
11
config/runtime.exs
Normal file
@@ -0,0 +1,11 @@
|
||||
import Config
|
||||
|
||||
if config_env() == :prod do
|
||||
database_path =
|
||||
System.get_env("BDS_DATABASE_PATH") ||
|
||||
Path.expand("../priv/data/bds_prod.db", __DIR__)
|
||||
|
||||
config :bds, BDS.Repo,
|
||||
database: database_path,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "5")
|
||||
end
|
||||
8
config/test.exs
Normal file
8
config/test.exs
Normal file
@@ -0,0 +1,8 @@
|
||||
import Config
|
||||
|
||||
config :bds, BDS.Repo,
|
||||
database: Path.expand("../priv/data/bds_test.db", __DIR__),
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: 5
|
||||
|
||||
config :logger, level: :warning
|
||||
Reference in New Issue
Block a user