fix: support DATABASE_URL in dev config for CI e2e tests
This commit is contained in:
parent
04c6bcc2d2
commit
6ad7f7233d
1 changed files with 19 additions and 8 deletions
|
|
@ -126,14 +126,25 @@ config :towerops, Oban,
|
|||
]
|
||||
|
||||
# Configure your database
|
||||
config :towerops, Towerops.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
database: "towerops_dev",
|
||||
stacktrace: true,
|
||||
show_sensitive_data_on_connection_error: true,
|
||||
pool_size: 10
|
||||
# Configure your database
|
||||
# In CI, DATABASE_URL is set and will be used automatically by Ecto.
|
||||
# Locally, fall back to individual connection parameters.
|
||||
if database_url = System.get_env("DATABASE_URL") do
|
||||
config :towerops, Towerops.Repo,
|
||||
url: database_url,
|
||||
stacktrace: true,
|
||||
show_sensitive_data_on_connection_error: true,
|
||||
pool_size: 10
|
||||
else
|
||||
config :towerops, Towerops.Repo,
|
||||
username: "postgres",
|
||||
password: "postgres",
|
||||
hostname: "localhost",
|
||||
database: "towerops_dev",
|
||||
stacktrace: true,
|
||||
show_sensitive_data_on_connection_error: true,
|
||||
pool_size: 10
|
||||
end
|
||||
|
||||
# Configure Cloak encryption for development
|
||||
# Use a fixed key for development (DO NOT use in production!)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue