remove secret and prevent it from leaking again

This commit is contained in:
stupidcomputer 2024-06-28 16:42:00 -05:00
parent 3fa153ee59
commit 2b24590959
3 changed files with 4 additions and 2 deletions

View File

@ -1,2 +1,2 @@
SECRET_KEY=834701
SECRET_KEY=change_me
DJANGO_ALLOWED_HOSTS=localhost 127.0.0.1 [::1]

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ db.sqlite3
media
uploads/
staticfiles/
.env.prod

View File

@ -1,5 +1,6 @@
prod: # execute this target on the production server in the nix-shell
rm -r franklincce/staticfiles
cd franklincce; python3 manage.py collectstatic
sed -i "s/change_me/$(shell shuf -i1-1000000 -n1)/g" .env.prod
sed "s/change_me/$(shell shuf -i1-1000000 -n1)/g" .env.prod.orig > .env.prod
sed "s|change_me|$(shell dd if=/dev/urandom bs=1024 count=1|base64)|g" .env.prod.orig > .env.prod
docker-compose -f docker-compose.prod.yml up -d --build