Skip to content

Commit 0ca79ab

Browse files
authored
ADD: Alternative command to change password (#12931)
Alternative command useful for automation.
1 parent a2bb109 commit 0ca79ab

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

readme-docs/DOCKER.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,11 @@ Make sure you write down the first password generated as you'll need it when re-
152152
docker compose exec -it uwsgi ./manage.py changepassword admin
153153
```
154154

155+
Alternatively, you can run the command below to change the admin password in a single command. Useful for automation.
156+
```zsh
157+
docker compose exec uwsgi ./manage.py shell -c 'from django.contrib.auth.models import User; u = User.objects.get(username="admin"); u.set_password("Password123!"); u.save()'
158+
```
159+
155160
# Logging
156161
For docker compose release mode the log level is INFO. In the other modes the log level is DEBUG. Logging is configured in `settings.dist.py` and can be tuned using a `local_settings.py`, see [template for local_settings.py](../dojo/settings/template-local_settings)). For example the deduplication logger can be set to DEBUG in a local_settings.py file:
157162

0 commit comments

Comments
 (0)