diff --git a/Dockerfile b/Dockerfile index c5856bcfa5..3f17d0f118 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 @@ -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 diff --git a/boot.sh b/boot.sh index ab5d7fdddd..ae3dbb51d8 100644 --- a/boot.sh +++ b/boot.sh @@ -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 diff --git a/cookbook/tests/other/test_automations.py b/cookbook/tests/other/test_automations.py index 48416caa73..8b7b5568f7 100644 --- a/cookbook/tests/other/test_automations.py +++ b/cookbook/tests/other/test_automations.py @@ -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: diff --git a/requirements.txt b/requirements.txt index 49c84c701f..b457d2c464 100644 --- a/requirements.txt +++ b/requirements.txt @@ -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