Database Engines

grouprise stores most of its data in an SQL database. Only uploaded media files are stored in the filesystem.

All databases supported by Django are usable for grouprise, e.g.:

  • SQLite
  • PostgreSQL
  • MySQL / MariaDB

See the Django Database documentation for all settings related to the database connection.

By default grouprise uses the SQLite backend. A public site should probably use one of the other database backends instead, in order to improve performance.

The database engine and its details are configured in /etc/grouprise/settings.py.

Example Configurations

SQLite

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.sqlite3',
        'NAME': '/var/lib/grouprise/db.sqlite3',
    }
}

PostgreSQL

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'mydatabase',
        'USER': 'mydatabaseuser',
        'PASSWORD': 'mypassword',
        'HOST': '127.0.0.1',
        'PORT': '5432',
    }
}

MySQL / MariaDB

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.mysql',
        'NAME': 'mydatabase',
        'USER': 'mydatabaseuser',
        'PASSWORD': 'mypassword',
        'HOST': '127.0.0.1',
        'PORT': '5432',
    }
}

In case of MySQL before v5.7: please read Django hints for the setting ‘sql_mode’.