summaryrefslogtreecommitdiffstats
path: root/cli/src/api.rs
diff options
context:
space:
mode:
authorHarald Eilertsen <haraldei@anduin.net>2024-04-24 11:23:30 +0200
committerHarald Eilertsen <haraldei@anduin.net>2024-04-24 11:23:30 +0200
commit1c3e4dba9fe90faa318933a99eecdb9cd5e7481a (patch)
treeb648818504bbd78bdf0bb1756e5a4d9879e76931 /cli/src/api.rs
parentb618514904b005ea5d2d51ae174b2ca5e24b31c5 (diff)
downloadfaktura-1c3e4dba9fe90faa318933a99eecdb9cd5e7481a.tar.gz
faktura-1c3e4dba9fe90faa318933a99eecdb9cd5e7481a.tar.bz2
faktura-1c3e4dba9fe90faa318933a99eecdb9cd5e7481a.zip
postgrest: Use env vars for connecting to the db.
Get rid of the hardcoded creds for this part at least (they're still in the schema definition for now), but the main motivation at this point is to be able to bootstrap the system. The thing is: If the postgrest container is not able to connect to the db it refuses to start and dies. This means the nginx container will not be able to check the connection to the postgrest service, and it also dies. Since ddev considers the system broken if the web container dies, it just stops everything and kills the db container too. Iow, we're not able to add the authenticator user to the db so that postgrest will boot, and the rest of the system with it. So to bootstrap the system, do the following: Set PGRST_DB_USER and PGRST_DB_PASS both to the default ddev db user ("db"). Load the db schema: % ddev psql < sql/schema.sql Change the PGRST_DB_USER and PGRST_DB_PASS to their proper values, and store them in the .ddev/.env file. Then restart the project: % ddev restart The postgrest container should now use the correct credentials.
Diffstat (limited to 'cli/src/api.rs')
0 files changed, 0 insertions, 0 deletions