removing pre-cached staticfiles from Docker & boot.sh

This commit is contained in:
smilerz
2024-04-30 07:21:30 -05:00
parent 771375b40b
commit 1d58f318ca
2 changed files with 4 additions and 23 deletions

21
boot.sh
View File

@@ -67,25 +67,12 @@ echo "Migrating database"
python manage.py migrate
if [[ "${DOCKER}" == "true" ]]; then
if [[ -d "/opt/recipes/staticfiles-collect" ]]; then
echo "Copying cached static files from docker build"
echo "Collecting static files, this may take a while..."
mkdir -p /opt/recipes/staticfiles
rm -rf /opt/recipes/staticfiles/*
mv /opt/recipes/staticfiles-collect/* /opt/recipes/staticfiles
rm -rf /opt/recipes/staticfiles-collect
else
echo "Static files are already up to date"
fi
else
echo "Collecting static files, this may take a while..."
python manage.py collectstatic_js_reverse
python manage.py collectstatic --noinput
python manage.py collectstatic_js_reverse
python manage.py collectstatic --noinput
echo "Done"
fi
echo "Done"
chmod -R 755 /opt/recipes/mediafiles