Grouprise 4.0.0

Release date: 2021-06-30

New configuration format

Previously grouprise was configured directly via Django settings (e.g. /etc/grouprise/settings.py). This caused problems for the automation of configuration changes and it introduced the complexity of using code instead of a pure data definition.

The new configuration mechanism uses the YAML format and supports multiple configuration files.

The old configuration will be used as long as /etc/grouprisee/settings.py exists, but you are encouraged to migrate to the new format as soon as possible.

Migrate your old settings to the new ones:

  1. upgrade grouprise to v4.0
  2. create the directory /etc/grouprise/conf.d/
  3. manually convert the old settings (/etc/grouprisee/settings.py) to the new format (e.g. /etc/grouprise/conf.d/local.yaml, see below for comprehensive examples)
  4. rename or remove the old configuration file (/etc/grouprisee/settings.py)
  5. restart the grouprise service

Migration examples

  • from grouprise.common_settings import *:
    • discard this line
  • SECRET_KEY = '...'
    • secret_key: '...' [doc]
  • ALLOWED_HOSTS
    • this line can be discarded under most circumstances
    • see extra_allowed_hosts for special cases
  • DATABASES = {'default': {'engine': '... 'name: '...'}}:
    • database: { engine: ..., name: ... } [doc]
  • SESSION_COOKIE_AGE = 60 * 60 * 24 * 365:
    • session_cookie_age: 31536000 [doc]
  • ADMINS = [ ... ]
    • log_recipient_emails: [ ... ] [doc]
  • DEFAULT_FROM_EMAIL = '...':
    • default_from_email: ... [doc]
  • SERVER_EMAIL = '...':
    • can be discarded (indirectly configured via default_from_email)
  • SECURE_CONTENT_TYPE_NOSNIFF:
    • can be discarded (enabled by default since grouprise v4.0)
  • ACCOUNT_DEFAULT_HTTP_PROTOCOL, SECURE_PROXY_SSL_HEADER, SECURE_HSTS_SECONDS, SECURE_HSTS_INCLUDE_SUBDOMAINS, SECURE_SSL_REDIRECT, SESSION_COOKIE_SECURE, CSRF_COOKIE_SECURE:
    • indirectly configured via transport_security [doc]
  • TEMPLATES[0]['DIRS'] += '...':
    • template_directories: [ ... ] [doc]
  • DEBUG: False:
    • debug: false [doc]
  • GROUPRISE['BACKUP_PATH'] = '...':
    • backup_path: ... [doc]
  • GROUPRISE['CLAIMS'] = [ ... ]:
    • claims: [ ... ] [doc]
  • GROUPRISE['DEFAULT_DISTINCT_FROM_EMAIL'] = '...':
    • default_distinct_from_email: ... [doc]
  • GROUPRISE['DEFAULT_REPLY_TO_EMAIL'] = '...':
    • default_reply_to_email: ... [doc]
  • GROUPRISE['COLLECTOR_MAILBOX_ADDRESS'] and GROUPRISE['MAILBOX_DELIVERED_TO_EMAIL']
    • collector_mailbox_address: ... [doc]
  • GROUPRISE['POSTMASTER_EMAIL'] = '...':
    • postmaster_email: ... [doc]
  • GROUPRISE['MAILINGLIST_ENABLED'] = True:
    • mailinglist_enabled: true [doc]
  • GROUPRISE['BRANDING_LOGO_BACKDROP'], GROUPRISE['BRANDING_LOGO_FAVICON'], GROUPRISE['BRANDING_LOGO_SQUARE'], GROUPRISE['BRANDING_LOGO_TEXT']:
branding:
    logo_backdrop: ...
    logo_favicon: ...
    logo_square: ...
    logo_text: ...
  • GROUPRISE['FEED_IMPORTER_GESTALT_ID'] = 42:
    • feed_importer_gestalt_id: 42 [doc]
  • GROUPRISE['OPERATOR_GROUP_ID'] = 1:
    • operator_group_id: 1 [doc]
  • GROUPRISE['UNKNOWN_GESTALT_ID'] = 23:
    • unknown_gestalt_id: 23 [doc]
  • GROUPRISE['SCORE_CONTENT_AGE'] = 100:
    • score_content_age: 100 [doc]
  • GROUPRISE['UPLOAD_MAX_FILE_SIZE'] = 10:
    • upload_max_file_size: 10 [doc]
  • CSP_DEFAULT_SRC, CSP_SCRIPT_SRC, CSP_CONNECT_SRC:
csp:
  default_src:
    - "https://matomo.grouprise.org/"
  script_src:
    - "https://matomo.grouprise.org/"
    - "'sha256-J/TOUvP2iy3vYT4YNCGNCxigNR11I1/ut517suNX1hk='"
  connect_src:
    - foo
  • anything else?
    • create a separate Django configuration file (e.g. /etc/grouprise/django_settings.py) with the remaining settings
    • add the setting extra_django_settings_filenames to your new grouprise configuration file:
extra_django_settings_filenames:
    - /etc/grouprise/django_settings.py