Add DJANGO_SECRET_KEY support for Dispatcharr v0.13.1+ (#9730)

* Initial plan

* Add DJANGO_SECRET_KEY support for Dispatcharr v0.13.1+

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>

* Improve DJANGO_SECRET_KEY generation to ensure consistent 50 character length

Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>

* short

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: MickLesk <47820557+MickLesk@users.noreply.github.com>
This commit is contained in:
Copilot
2025-12-07 12:38:37 +01:00
committed by GitHub
parent 64dbd4e9f7
commit 1ecb5bbeab
2 changed files with 8 additions and 0 deletions

View File

@ -87,6 +87,11 @@ function update_script() {
mv /tmp/start-daphne.sh.backup /opt/dispatcharr/start-daphne.sh
fi
if ! grep -q "DJANGO_SECRET_KEY" /opt/dispatcharr/.env; then
DJANGO_SECRET=$(openssl rand -base64 48 | tr -dc 'a-zA-Z0-9' | cut -c1-50)
echo "DJANGO_SECRET_KEY=$DJANGO_SECRET" >> /opt/dispatcharr/.env
fi
cd /opt/dispatcharr
rm -rf .venv
$STD uv venv