2023-08-03 18:07:27 -07:00
|
|
|
development:
|
2023-08-03 18:07:27 -07:00
|
|
|
primary:
|
Move the `host: db` part of the dev container into its environment vars
Okay, so I've kept `database.yml` using the new username and password
`impress_dev`, cuz I like that it helps clarify that it's dev stuff and
is impossible to confuse with prod. (I updated my local setup to match!)
But hardcoding `host: db` into here breaks my local setup where the
database _isn't_ at the hostname `db`. So I add a way for new optional
database URL environment variables to get merged in with these settings,
and then configured the dev container to use that—and just in the most
limited override possible, to avoid duplicating stuff we don't need to.
(I could've just used the same names `DATABASE_URL_{PRIMARY,OPENNEO_ID}`
for this, but idk, I think it's confusing to have the same one for both
dev and prod, even though Rails _does_ basically do this; see below.)
Normally, the environment variable `DATABASE_URL` just _does_ this, and
you don't need to include a `url` key at all to get this behavior. But
since we've got the legacy two-database thing going on, we do this
instead! If we were to merge the `openneo_id.users` table into the
primary database, we could simplify this!
2023-10-26 14:20:15 -07:00
|
|
|
# You can override these default settings with this environment variable,
|
|
|
|
# fully or partially. We do this in the .devcontainer setup!
|
|
|
|
url: <%= ENV['DATABASE_URL_PRIMARY_DEV'] %>
|
2023-08-03 18:07:27 -07:00
|
|
|
adapter: mysql2
|
|
|
|
database: openneo_impress
|
2023-08-29 11:39:12 -07:00
|
|
|
username: impress_dev
|
|
|
|
password: impress_dev
|
2023-08-03 18:07:27 -07:00
|
|
|
pool: 5
|
|
|
|
variables:
|
|
|
|
sql_mode: TRADITIONAL
|
|
|
|
|
|
|
|
openneo_id:
|
Move the `host: db` part of the dev container into its environment vars
Okay, so I've kept `database.yml` using the new username and password
`impress_dev`, cuz I like that it helps clarify that it's dev stuff and
is impossible to confuse with prod. (I updated my local setup to match!)
But hardcoding `host: db` into here breaks my local setup where the
database _isn't_ at the hostname `db`. So I add a way for new optional
database URL environment variables to get merged in with these settings,
and then configured the dev container to use that—and just in the most
limited override possible, to avoid duplicating stuff we don't need to.
(I could've just used the same names `DATABASE_URL_{PRIMARY,OPENNEO_ID}`
for this, but idk, I think it's confusing to have the same one for both
dev and prod, even though Rails _does_ basically do this; see below.)
Normally, the environment variable `DATABASE_URL` just _does_ this, and
you don't need to include a `url` key at all to get this behavior. But
since we've got the legacy two-database thing going on, we do this
instead! If we were to merge the `openneo_id.users` table into the
primary database, we could simplify this!
2023-10-26 14:20:15 -07:00
|
|
|
# You can override these default settings with this environment variable,
|
|
|
|
# fully or partially. We do this in the .devcontainer setup!
|
|
|
|
url: <%= ENV['DATABASE_URL_OPENNEO_ID_DEV'] %>
|
2023-08-03 18:07:27 -07:00
|
|
|
adapter: mysql2
|
|
|
|
database: openneo_id
|
2023-08-29 11:39:12 -07:00
|
|
|
username: impress_dev
|
|
|
|
password: impress_dev
|
2023-08-03 18:07:27 -07:00
|
|
|
pool: 2
|
|
|
|
variables:
|
|
|
|
sql_mode: TRADITIONAL
|
2023-08-06 18:03:06 -07:00
|
|
|
migrations_paths: db/openneo_id_migrate
|
2023-08-03 18:07:27 -07:00
|
|
|
|
2024-01-19 00:00:46 -08:00
|
|
|
test:
|
|
|
|
primary:
|
|
|
|
# You can override these default settings with this environment variable,
|
|
|
|
# fully or partially. We do this in the .devcontainer setup!
|
|
|
|
url: <%= ENV['DATABASE_URL_PRIMARY_TEST'] %>
|
|
|
|
adapter: mysql2
|
|
|
|
database: openneo_impress_test
|
|
|
|
username: impress_dev
|
|
|
|
password: impress_dev
|
|
|
|
pool: 5
|
|
|
|
variables:
|
|
|
|
sql_mode: TRADITIONAL
|
|
|
|
|
|
|
|
openneo_id:
|
|
|
|
# You can override these default settings with this environment variable,
|
|
|
|
# fully or partially. We do this in the .devcontainer setup!
|
|
|
|
url: <%= ENV['DATABASE_URL_OPENNEO_ID_TEST'] %>
|
|
|
|
adapter: mysql2
|
|
|
|
database: openneo_id_test
|
|
|
|
username: impress_dev
|
|
|
|
password: impress_dev
|
|
|
|
pool: 2
|
|
|
|
variables:
|
|
|
|
sql_mode: TRADITIONAL
|
|
|
|
migrations_paths: db/openneo_id_migrate
|
|
|
|
|
2023-08-03 18:07:27 -07:00
|
|
|
production:
|
2023-08-03 18:07:27 -07:00
|
|
|
primary:
|
|
|
|
url: <%= ENV['DATABASE_URL_PRIMARY'] %>
|
|
|
|
variables:
|
|
|
|
sql_mode: TRADITIONAL
|
|
|
|
|
|
|
|
openneo_id:
|
|
|
|
url: <%= ENV['DATABASE_URL_OPENNEO_ID'] %>
|
|
|
|
variables:
|
|
|
|
sql_mode: TRADITIONAL
|
2023-08-06 18:03:06 -07:00
|
|
|
migrations_paths: db/openneo_id_migrate
|