From 0077d26142c8435d6460db10888080039e2816d7 Mon Sep 17 00:00:00 2001 From: "Christopher C. Wells" Date: Sat, 21 Oct 2023 07:11:35 -0700 Subject: [PATCH] Add detail on running commands in an LSIO container See #729 --- docs/setup/deployment.md | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/docs/setup/deployment.md b/docs/setup/deployment.md index 88bc8743..0235fd45 100644 --- a/docs/setup/deployment.md +++ b/docs/setup/deployment.md @@ -33,15 +33,24 @@ See [Django's databases documentation](https://docs.djangoproject.com/en/4.2/ref See [HTTPS/SSL configuration](ssl.md) for information on how to secure Baby Buddy. -For doing administrative work within the LSIO container, setting an environment variable may be necessary. -For example: +### Running commands + +Run administrative commands with the `/app/www/public/manage.py` script. Set +the environment variables `DJANGO_SETTINGS_MODULE` and `SECRET_KEY` before +running commands. For example: ```shell docker exec -it babybuddy /bin/bash export DJANGO_SETTINGS_MODULE="babybuddy.settings.base" -python3 /app/babybuddy/manage.py clearsessions +export SECRET_KEY="$(cat /config/.secretkey)" +cd /app/www/public +python manage.py --help ``` +Note: the container name (`babybuddy`) and secret key location +(`/config/.secretkey`) may differ depending on the container configuration. +Refer to the running containers configuration for these values. + ## Home Assistant [Home Assistant](https://www.home-assistant.io/) is an open source home automation tool