2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-12 10:05:39 +00:00

[FR] Support creating reading initial superuser account password from file (#6144)

* factored out user creation step

* [FR] Support creating reading initial superuser account password from file
Fixes #5471

* added docs

* use env too with password file

* do not warn if passwordfile is set
This commit is contained in:
Matthias Mair
2024-01-05 21:38:53 +01:00
committed by GitHub
parent 6a6a5932f3
commit 93df90d295
3 changed files with 45 additions and 3 deletions

View File

@ -88,8 +88,11 @@ An administrator account can be specified using the following environment variab
| --- | --- | --- | --- |
| INVENTREE_ADMIN_USER | admin_user | Admin account username | *Not specified* |
| INVENTREE_ADMIN_PASSWORD | admin_password | Admin account password | *Not specified* |
| INVENTREE_ADMIN_PASSWORD_FILE | admin_password_file | Admin account password file | *Not specified* |
| INVENTREE_ADMIN_EMAIL | admin_email |Admin account email address | *Not specified* |
You can either specify the password directly using `INVENTREE_ADMIN_PASSWORD`, or you can specify a file containing the password using `INVENTREE_ADMIN_PASSWORD_FILE` (this is useful for nix users).
!!! info "Administrator Account"
Providing `INVENTREE_ADMIN` credentials will result in the provided account being created with *superuser* permissions when InvenTree is started.