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".

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. This tool can be found at the /migration endpoint and is only accessible when a Postgres connection is provided.

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9