Remove ecto repo, add writing to file
This commit is contained in:
parent
386a331956
commit
ce463329f6
20 changed files with 98 additions and 122 deletions
|
|
@ -8,7 +8,6 @@
|
|||
import Config
|
||||
|
||||
config :birdy_chat,
|
||||
ecto_repos: [BirdyChat.Repo],
|
||||
generators: [timestamp_type: :utc_datetime]
|
||||
|
||||
# Configure the endpoint
|
||||
|
|
|
|||
|
|
@ -1,15 +1,5 @@
|
|||
import Config
|
||||
|
||||
# Configure your database
|
||||
config :birdy_chat, BirdyChat.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
database: "birdy_chat_dev",
|
||||
stacktrace: true,
|
||||
show_sensitive_data_on_connection_error: true,
|
||||
pool_size: 10
|
||||
|
||||
# For development, we disable any cache and enable
|
||||
# debugging and code reloading.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -24,23 +24,6 @@ config :birdy_chat, BirdyChatWeb.Endpoint,
|
|||
http: [port: String.to_integer(System.get_env("PORT", "4000"))]
|
||||
|
||||
if config_env() == :prod do
|
||||
database_url =
|
||||
System.get_env("DATABASE_URL") ||
|
||||
raise """
|
||||
environment variable DATABASE_URL is missing.
|
||||
For example: ecto://USER:PASS@HOST/DATABASE
|
||||
"""
|
||||
|
||||
maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []
|
||||
|
||||
config :birdy_chat, BirdyChat.Repo,
|
||||
# ssl: true,
|
||||
url: database_url,
|
||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
||||
# For machines with several cores, consider starting multiple pools of `pool_size`
|
||||
# pool_count: 4,
|
||||
socket_options: maybe_ipv6
|
||||
|
||||
# The secret key base is used to sign/encrypt cookies and other secrets.
|
||||
# A default value is used in config/dev.exs and config/test.exs but you
|
||||
# want to use a different value for prod and you most likely don't want
|
||||
|
|
|
|||
|
|
@ -1,18 +1,5 @@
|
|||
import Config
|
||||
|
||||
# Configure your database
|
||||
#
|
||||
# The MIX_TEST_PARTITION environment variable can be used
|
||||
# to provide built-in test partitioning in CI environment.
|
||||
# Run `mix help test` for more information.
|
||||
config :birdy_chat, BirdyChat.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
database: "birdy_chat_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||
pool: Ecto.Adapters.SQL.Sandbox,
|
||||
pool_size: System.schedulers_online() * 2
|
||||
|
||||
# We don't run a server during test. If one is required,
|
||||
# you can enable the server option below.
|
||||
config :birdy_chat, BirdyChatWeb.Endpoint,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue