Skip to content

Commit

Permalink
Revert "Merge pull request #3055 from tooboredtocode/develop"
Browse files Browse the repository at this point in the history
This reverts commit d766927, reversing
changes made to 4293ec7.
  • Loading branch information
vabene1111 committed Apr 8, 2024
1 parent c031db9 commit f14acc3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 21 deletions.
8 changes: 0 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ RUN apk add --no-cache postgresql-libs postgresql-client gettext zlib libjpeg li
#Print all logs without buffering it.
ENV PYTHONUNBUFFERED 1

ENV DOCKER true

#This port will be used by gunicorn.
EXPOSE 8080

Expand Down Expand Up @@ -35,12 +33,6 @@ RUN apk add --no-cache --virtual .build-deps gcc musl-dev postgresql-dev zlib-de
#Copy project and execute it.
COPY . ./

# collect the static files
RUN /opt/recipes/venv/bin/python manage.py collectstatic_js_reverse
RUN /opt/recipes/venv/bin/python manage.py collectstatic --noinput
# copy the collected static files to a different location, so they can be moved into a potentially mounted volume
RUN mv /opt/recipes/staticfiles /opt/recipes/staticfiles-collect

# collect information from git repositories
RUN /opt/recipes/venv/bin/python version.py
# delete git repositories to reduce image size
Expand Down
17 changes: 4 additions & 13 deletions boot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,12 @@ echo "Migrating database"

python manage.py migrate

if [[ "${DOCKER}" == "true" ]]; then
echo "Copying cached static files from docker build"
echo "Generating static files"

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 "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

Expand Down

0 comments on commit f14acc3

Please sign in to comment.