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: