From 5536f2325ae178b1c7cd4d99bf53f8eb9cd356c9 Mon Sep 17 00:00:00 2001 From: zwitschi Date: Mon, 10 Nov 2025 08:24:19 +0100 Subject: [PATCH] Add instructions for seeding default accounts and roles in installation guide --- admin/installation.md | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/admin/installation.md b/admin/installation.md index b62140f..79a691e 100644 --- a/admin/installation.md +++ b/admin/installation.md @@ -46,7 +46,26 @@ Before you begin, ensure that you have the following prerequisites installed on The first time you run the application, the database will be initialized automatically. Ensure that the database container is running and accessible. -5. **Stopping the Application** +5. **Seed Default Accounts and Roles** + + After the schema is in place, run the initial data seeding utility so the default roles and administrator account exist: + + ```bash + # activate your virtualenv first + python -m scripts.00_initial_data + ``` + + The script reads the standard database environment variables (see below) and supports the following overrides: + + - `CALMINER_SEED_ADMIN_EMAIL` (default `admin@calminer.local`) + - `CALMINER_SEED_ADMIN_USERNAME` (default `admin`) + - `CALMINER_SEED_ADMIN_PASSWORD` (default `ChangeMe123!` — change in production) + - `CALMINER_SEED_ADMIN_ROLES` (comma list, always includes `admin`) + - `CALMINER_SEED_FORCE` (`true` to rotate the admin password on every run) + + You can rerun the script safely; it updates existing roles and user details without creating duplicates. + +6. **Stopping the Application** To stop the application, run the following command in the terminal: