Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
vabene1111 committed Apr 8, 2024
2 parents b9e806b + f14acc3 commit fb821ba
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 22 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
1 change: 1 addition & 0 deletions cookbook/tests/other/test_automations.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ def test_url_import_regex_replace(u1_s1):

if 'cookbook' in os.getcwd():
test_file = os.path.join(os.getcwd(), 'other', 'test_data', recipe)
# TODO this catch doesn't really work depending on from where you start the test, must check for duplicate path sections
else:
test_file = os.path.join(os.getcwd(), 'cookbook', 'tests', 'other', 'test_data', recipe)
with open(test_file, 'r', encoding='UTF-8') as d:
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Jinja2==3.1.3
django-webpack-loader==3.0.1
git+https://github.com/BITSOLVER/django-js-reverse@071e304fd600107bc64bbde6f2491f1fe049ec82
django-allauth==0.61.1
recipe-scrapers==14.55.0
recipe-scrapers==14.53.0
django-scopes==2.0.0
django-treebeard==4.7
django-cors-headers==4.3.1
Expand Down

0 comments on commit fb821ba

Please sign in to comment.