fix: support DATABASE_URL in dev config for CI e2e tests

This commit is contained in:
Graham McIntire 2026-03-07 15:45:42 -06:00
parent 04c6bcc2d2
commit 6ad7f7233d
No known key found for this signature in database

View file

@ -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!)