summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Begin web app frontend in PHP.mainHarald Eilertsen2024-04-268-1/+172
| | | | | | | | | | 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.
* cli: Add command to edit clients.Harald Eilertsen2024-04-253-0/+19
| | | | | | | 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.
* Strip `id` column when saving clients.Harald Eilertsen2024-04-251-1/+15
| | | | | Inserting multiple clients with the same id does not work, so we remove it and let the db backend assign the id instead.
* cli: Add feature to save clients to the db.Harald Eilertsen2024-04-245-9/+88
| | | | | | | 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.
* postgrest: Use env vars for connecting to the db.Harald Eilertsen2024-04-241-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Add license information to all files.Harald Eilertsen2024-04-228-1/+36
|
* Initial commitHarald Eilertsen2024-04-2212-0/+791