PostgreSQL
Bugsink works well with SQLite by default. In cloud-based environments, you may prefer PostgreSQL because a managed service may be available or simply because it’s already part of your existing stack. This page describes how to set up Bugsink with PostgreSQL.
Dockerized Bugsink
When you run Bugsink in a Docker container, the PostgreSQL database is configured using a single environment variable, in the following format:
"postgresql://user:password@host:port/database_name"
The necessary Python package (psycopg[binary]
) is automatically installed in the Docker container (it’s part of the
standard image).
Python Virtual Environment Based Setups
When you install Bugsink in a Python virtual environment, you need to install the psycopg[binary]
package manually (the
default database is SQLite, which doesn’t require any additional packages). The package can be installed using the
following command:
pip install "psycopg[binary]"
Bugsink requires psycopg version 3 or higher.
In this setup, your settings are in bugsink_conf.py
; you may configure PostgreSQL like so:
DATABASES['default'] = {
'ENGINE': 'django.db.backends.postgresql',
'NAME': "...", # the name of your database
"USER": "...", # the user to connect as
"PASSWORD": "...", # the password to use
"HOST": "...", # the host to connect to
"PORT": "...", # the port to connect to (usually 5432)
}