[PR #79] feat: add support for Postgres database provider #965

Closed
opened 2025-10-09 17:00:40 +03:00 by OVERLORD · 0 comments
Owner

Original Pull Request: https://github.com/pocket-id/pocket-id/pull/79

State: closed
Merged: Yes


With this PR it is now possible to use Postgres instead of Sqlite as the database provider.

The following environment variables were added that allows the admin to configure the database provider:

Variable Default Value Description
DB_PROVIDER sqlite The database provider you want to use. Currently sqlite and postgres are supported.
SQLITE_DB_PATH data/pocket-id.db The path to the SQLite database. This gets ignored if you didn't set DB_PROVIDER to sqlite.
POSTGRES_CONNECTION_STRING - The connection string to your Postgres database. This gets ignored if you didn't set DB_PROVIDER to postgres. A connection string can look like this: postgresql://user:password@host:5432/pocket-id.

This PR can be tested with the stonith404/pocket-id:postgres-development Docker image.

**Original Pull Request:** https://github.com/pocket-id/pocket-id/pull/79 **State:** closed **Merged:** Yes --- With this PR it is now possible to use Postgres instead of Sqlite as the database provider. The following environment variables were added that allows the admin to configure the database provider: | Variable | Default Value | Description | | ---------------------- | ------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `DB_PROVIDER` | `sqlite` | The database provider you want to use. Currently `sqlite` and `postgres` are supported. | | `SQLITE_DB_PATH` | `data/pocket-id.db` | The path to the SQLite database. This gets ignored if you didn't set `DB_PROVIDER` to `sqlite`. | | `POSTGRES_CONNECTION_STRING` | `-` | The connection string to your Postgres database. This gets ignored if you didn't set `DB_PROVIDER` to `postgres`. A connection string can look like this: `postgresql://user:password@host:5432/pocket-id`. | This PR can be tested with the `stonith404/pocket-id:postgres-development` Docker image.
OVERLORD added the pull-request label 2025-10-09 17:00:41 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/pocket-id-pocket-id-2#965