Add and document reencrypt_fields command

This commit is contained in:
Tobias Kunze 2025-03-21 15:58:52 +01:00
parent 899bffb974
commit 4e603246f7
5 changed files with 41 additions and 0 deletions

View file

@ -91,3 +91,20 @@ See `.forgejo/workflows/build-deploy-staging.yaml` for the actual workflow.
Deployment files are in the `deployment/kustomize` folder and makes use of [Kustomize](https://kustomize.io/) to account for differences between the deployment stages.
Stages are configured with overlays in `deployment/kustomize/overlays/$environment`.
## Maintenance and management commands
You can interface with the Django server and project by running commands like this:
```bash
uv run --env-file=.env src/manage.py COMMAND
```
Useful commands:
- ``migrate``: Make sure database migrations are applied.
- ``showmigrations``: Show current database migrations status. Good for debugging.
- ``runserver``: Run development server
- ``clearsessions``: Clear away expired user sessions. Recommended to run regularly, e.g. weekly or monthly (doesnt
need to be frequent, but otherwise, the database is going to bloat eventually)
- ``reencrypt_fields``: Run after you changed your ``SERVALA_SECRET_KEY`` or ``SERVALA_SALT_KEY`` in order to use the
new keys, and be able to retire the previous ones.