| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
While I'd like a command line client for retreiving information and
scripting stuff based on the db contents, a web app is convenient for
the less common stuff like adding and editing data.
The web app could also have been done in rust, however, I feel php is so
convenient for simple web stuff that I think it makes more sense this
way.
|
|
|
|
|
|
|
| |
Not entirely happy with this one. Specially the patch method of the
Connection struct. While the other method take (or return) an object
that can be serialized to json, the patch method takes a string slice
directly, and passing it to the API.
|
|
|
|
|
| |
Inserting multiple clients with the same id does not work, so we remove
it and let the db backend assign the id instead.
|
|
|
|
|
|
|
| |
Also introduces a Connection object to handle the actual connection to
the remote API. We also load the remote API url and jwt token from the
process environment so these are no longer hardcoded into the source
code.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|