2024-06-28 16:00:59 -05:00
|
|
|
prod: # execute this target on the production server in the nix-shell
|
2024-06-28 16:54:57 -05:00
|
|
|
rm -fr franklincce/staticfiles
|
2024-06-28 16:00:59 -05:00
|
|
|
cd franklincce; python3 manage.py collectstatic
|
2024-06-28 16:42:00 -05:00
|
|
|
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
|
2024-06-28 16:00:59 -05:00
|
|
|
docker-compose -f docker-compose.prod.yml up -d --build
|
2024-06-28 17:04:45 -05:00
|
|
|
|
|
|
|
permissions:
|
|
|
|
chmod -f 660 db.sqlite3
|
|
|
|
echo "make sure that db.sqlite3 is owned by group users"
|