Commit 4cd688
2024-02-09 04:59:13 Hargata Softworks: postgres/dev/null .. postgres.md | |
@@ 0,0 1,25 @@ | |
+ | # Postgres |
+ | |
+ | For users that desire additional scalability for their backend, LubeLogger now supports a PostgreSQL backend. |
+ | |
+ | ## Configuration |
+ | |
+ | To configure LubeLogger to use PostgreSQL, you must first create a database with a schema named "app" in it, in the screenshot below we created a DB named "lubelogger" and then a schema named "app". |
+ | |
+ | ![](/Postgres/a/image-1707454502212.png) |
+ | |
+ | Once that is done, simply inject the environment variable `POSTGRES_CONNECTION` with the your connection string, example: |
+ | |
+ | ``` |
+ | Host=<yourserveraddress:port>;Username=<yourusername>;Password=<yourpassword>;Database=<databasename>; |
+ | ``` |
+ | |
+ | LubeLogger will then automatically create the tables it needs, all records will then be saved and loaded from Postgres tables from now on. |
+ | |
+ | ## Backups |
+ | |
+ | Once you have switched over to Postgres, LubeLogger's built in and backup function will only back up images, documents, and the server config. You are responsible for maintaining backups of the DB records. |
+ | |
+ | ## Database Migration |
+ | |
+ | A tool is provided to ease the migration process between LiteDB and Postgres. |