feat(config): read database host port from DB_PORT in dev and test
This commit is contained in:
parent
365ff10fd8
commit
0a53e11cc4
2 changed files with 4 additions and 4 deletions
|
|
@ -5,7 +5,7 @@ config :mv, Mv.Repo,
|
||||||
username: "postgres",
|
username: "postgres",
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
hostname: "localhost",
|
hostname: "localhost",
|
||||||
port: 5000,
|
port: String.to_integer(System.get_env("DB_PORT") || "5000"),
|
||||||
database: "mv_dev",
|
database: "mv_dev",
|
||||||
stacktrace: true,
|
stacktrace: true,
|
||||||
show_sensitive_data_on_connection_error: true,
|
show_sensitive_data_on_connection_error: true,
|
||||||
|
|
@ -97,9 +97,9 @@ config :mv, :token_signing_secret, "IwUwi65TrEeExwBXXFPGm2I7889NsL"
|
||||||
# do not set defaults here so the SSO button stays hidden and no MissingSecret occurs.
|
# do not set defaults here so the SSO button stays hidden and no MissingSecret occurs.
|
||||||
# config :mv, :oidc,
|
# config :mv, :oidc,
|
||||||
# client_id: "mv",
|
# client_id: "mv",
|
||||||
# base_url: "http://localhost:8080/auth/v1",
|
# base_url: "http://localhost:#{System.get_env("RAUTHY_PORT") || "8080"}/auth/v1",
|
||||||
# client_secret: System.get_env("OIDC_CLIENT_SECRET"),
|
# client_secret: System.get_env("OIDC_CLIENT_SECRET"),
|
||||||
# redirect_uri: "http://localhost:4000/auth/user/oidc/callback"
|
# redirect_uri: "http://localhost:#{System.get_env("PORT") || "4000"}/auth/user/oidc/callback"
|
||||||
|
|
||||||
# AshAuthentication development configuration
|
# AshAuthentication development configuration
|
||||||
config :mv, :session_identifier, :jti
|
config :mv, :session_identifier, :jti
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ config :mv, Mv.Repo,
|
||||||
username: "postgres",
|
username: "postgres",
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
hostname: System.get_env("TEST_POSTGRES_HOST", "localhost"),
|
hostname: System.get_env("TEST_POSTGRES_HOST", "localhost"),
|
||||||
port: System.get_env("TEST_POSTGRES_PORT", "5000"),
|
port: System.get_env("TEST_POSTGRES_PORT") || System.get_env("DB_PORT") || "5000",
|
||||||
database: "mv_test#{System.get_env("MIX_TEST_PARTITION")}",
|
database: "mv_test#{System.get_env("MIX_TEST_PARTITION")}",
|
||||||
pool: Ecto.Adapters.SQL.Sandbox,
|
pool: Ecto.Adapters.SQL.Sandbox,
|
||||||
pool_size: System.schedulers_online() * 8,
|
pool_size: System.schedulers_online() * 8,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue