From a6fbd4d8a8828c3ec9120b4cc4a3095d6883a57a Mon Sep 17 00:00:00 2001 From: Sean Kelly Date: Fri, 15 Nov 2024 12:17:23 -0600 Subject: [PATCH] Support #380 by undoing all of the upgrades from #374 --- .github/workflows/delivery.yaml | 2 +- docker/Dockerfile | 64 +++++++++++-------- docker/docker-compose.yaml | 4 +- src/edrn.collabgroups/setup.cfg | 4 +- src/edrn.metrics/setup.cfg | 4 +- src/edrn.theme/setup.cfg | 4 +- src/edrnsite.content/setup.cfg | 6 +- src/edrnsite.controls/setup.cfg | 4 +- src/edrnsite.ploneimport/setup.cfg | 4 +- src/edrnsite.policy/setup.cfg | 18 +++--- .../src/edrnsite/policy/settings/ops.py | 4 +- src/edrnsite.search/setup.cfg | 4 +- src/edrnsite.streams/setup.cfg | 4 +- src/edrnsite.test/setup.cfg | 4 +- src/eke.biomarkers/setup.cfg | 10 +-- src/eke.geocoding/setup.cfg | 4 +- src/eke.knowledge/setup.cfg | 12 ++-- .../src/eke/knowledge/sciencedata.py | 3 +- support/cbiit-deploy-prod.sh | 10 +-- support/cbiit-deploy.sh | 12 ++-- 20 files changed, 97 insertions(+), 84 deletions(-) diff --git a/.github/workflows/delivery.yaml b/.github/workflows/delivery.yaml index db3b67e5..4e20af86 100644 --- a/.github/workflows/delivery.yaml +++ b/.github/workflows/delivery.yaml @@ -18,7 +18,7 @@ on: push: branches: - main - - i374 + - i380 paths: - 'src/**' - 'docker/Dockerfile' diff --git a/docker/Dockerfile b/docker/Dockerfile index 88e24b6e..efcb0aeb 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,7 +15,7 @@ # `numpy-gitpod` and `numpy-dev`β€”and I'm not going to use a `-dev` image in production.) See the `py_deps` # below. -FROM alpine:3.19 +FROM alpine:3.18 # Configurable Arguments @@ -58,8 +58,8 @@ RUN \ : RUN \ - build_deps="automake bzip2-dev cyrus-sasl-dev git g++ gcc libffi-dev libjpeg-turbo-dev libwebp-dev libxml2-dev libxslt-dev make musl-dev openjpeg-dev openldap-dev openssl-dev pcre-dev python3-dev postgresql-dev su-exec tiff-dev zlib-dev py3-pip" &&\ - run_deps="curl krb5-libs libgcc libjpeg-turbo libldap libpq libsasl libstdc++ libwebp libxml2 libxslt netcat-openbsd openjpeg python3 rsync tiff tidyhtml py3-gunicorn py3-flask" &&\ + build_deps="automake bzip2-dev cyrus-sasl-dev git g++ gcc libffi-dev libjpeg-turbo-dev libwebp-dev libxml2-dev libxslt-dev make musl-dev openjpeg-dev openldap-dev openssl-dev pcre-dev python3-dev postgresql-dev su-exec tiff-dev zlib-dev" &&\ + run_deps="curl krb5-libs libgcc libjpeg-turbo libldap libpq libsasl libstdc++ libwebp libxml2 libxslt netcat-openbsd openjpeg python3 rsync tiff tidyhtml" &&\ py_deps="py3-numpy py3-pandas py3-pillow py3-psycopg2 py3-biopython" &&\ /sbin/apk update --quiet &&\ /sbin/apk add --no-progress --quiet --virtual /edrn-build $build_deps &&\ @@ -69,21 +69,31 @@ RUN \ # Over on GitHub Actions, we need to fail fast and not hit the six hour run limit, so make sure we got it right -RUN echo `/usr/bin/python3 --version` | grep -q '^Python 3\.11\.' -RUN echo `/usr/bin/python3 -c 'import numpy; print(numpy.__version__)'` | grep -q '^1\.25\.' -RUN echo `/usr/bin/python3 -c 'import pandas; print(pandas.__version__)'` | grep -q '^2\.0\.' -RUN echo `/usr/bin/python3 -c 'import PIL; print(PIL.__version__)'` | grep -q '^10\.3\.' -RUN echo `/usr/bin/python3 -c 'import psycopg2; print(psycopg2.__version__)'` | grep -q '^2\.9\.' +RUN [ "`/usr/bin/python3 --version`" = "Python 3.11.10" ] +RUN [ "`/usr/bin/python3 -c 'import numpy; print(numpy.__version__)'`" = "1.24.4" ] +RUN [ "`/usr/bin/python3 -c 'import pandas; print(pandas.__version__)'`" = "1.5.3" ] +RUN [ "`/usr/bin/python3 -c 'import PIL; print(PIL.__version__)'`" = "9.5.0" ] +RUN [ "`/usr/bin/python3 -c 'import psycopg2; print(psycopg2.__version__)'`" = "2.9.6 (dt dec pq3 ext lo64)" ] +RUN [ "`/usr/bin/python3 -c 'import Bio; print(Bio.__version__)'`" = "1.81" ] + +# RUN echo `/usr/bin/python3 --version` | grep -q '^Python 3\.11\.' +# RUN echo `/usr/bin/python3 -c 'import numpy; print(numpy.__version__)'` | grep -q '^1\.25\.' +# RUN echo `/usr/bin/python3 -c 'import pandas; print(pandas.__version__)'` | grep -q '^2\.0\.' +# RUN echo `/usr/bin/python3 -c 'import PIL; print(PIL.__version__)'` | grep -q '^10\.3\.' +# RUN echo `/usr/bin/python3 -c 'import psycopg2; print(psycopg2.__version__)'` | grep -q '^2\.9\.' # Note that Biopython does not use MAJOR.MINOR.MICRO versions so there's no trailing dot here -RUN echo `/usr/bin/python3 -c 'import Bio; print(Bio.__version__)'` | grep -q '^1\.81' +# RUN echo `/usr/bin/python3 -c 'import Bio; print(Bio.__version__)'` | grep -q '^1\.81' RUN \ : See https://github.com/python-ldap/python-ldap/issues/432 for workaround to Python LDAP vs OpenLDAP 2.5 issue &&\ echo 'INPUT ( libldap.so )' > /usr/lib/libldap_r.so &&\ - /usr/bin/python3 -m venv --system-site-packages --upgrade-deps /app &&\ - /usr/bin/install -o edrn -g edrn -d /app/media /app/static /app/wheels &&\ + /usr/bin/python3 -m ensurepip --upgrade &&\ + /usr/bin/pip3 install --quiet --progress-bar off --upgrade pip setuptools wheel &&\ + /usr/bin/pip3 install gunicorn==20.1.0 &&\ + /usr/bin/install -o edrn -g edrn -d /app /app/media /app/static /app/wheels &&\ : + COPY --chown=edrn:edrn ./dist/*.whl /app/wheels/ # Normally a single RUN would work fine: @@ -103,30 +113,32 @@ COPY --chown=edrn:edrn ./dist/*.whl /app/wheels/ # Except the Docker plugin for Jenkins at CBIIT chokes with an HTTP 400 error because apparently # the single layer made above is too big. So, we have to do these in separate RUNs: -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrnsite.controls-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrnsite.streams-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrnsite.content-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrn.collabgroups-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrn.theme-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrnsite.ploneimport-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/eke.geocoding-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/eke.knowledge-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/eke.biomarkers-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrnsite.search-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrn.metrics-*.whl -RUN /app/bin/pip3 install --progress-bar off /app/wheels/edrnsite.policy-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrnsite.controls-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrnsite.streams-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrnsite.content-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrn.collabgroups-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrn.theme-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrnsite.ploneimport-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/eke.geocoding-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/eke.knowledge-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/eke.biomarkers-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrnsite.search-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrn.metrics-*.whl +RUN /usr/bin/pip3 install --progress-bar off /app/wheels/edrnsite.policy-*.whl # And this too: RUN \ cd /app &&\ : Get the static files ready &&\ - /sbin/su-exec edrn /usr/bin/env LDAP_BIND_PASSWORD=unused SIGNING_KEY=unused /app/bin/django-admin collectstatic --settings edrnsite.policy.settings.ops --no-input --clear --link &&\ + /sbin/su-exec edrn /usr/bin/env LDAP_BIND_PASSWORD=unused SIGNING_KEY=unused /usr/bin/django-admin collectstatic --settings edrnsite.policy.settings.ops --no-input --clear --link &&\ : Clean up clean up everybody everywhere &&\ + : PrismaCloud does not like pip to be in the image &&\ + /usr/bin/pip3 uninstall --yes --quiet pip &&\ /sbin/apk del --quiet /edrn-build &&\ /bin/rm -rf /app/wheels &&\ /bin/rm -rf /var/cache/apk/* &&\ - /bin/chown -R edrn:edrn /app/lib/python3.*/site-packages &&\ + /bin/chown -R edrn:edrn /usr/lib/python3.*/site-packages &&\ : COPY --chown=edrn:edrn docker/*.py /app/ @@ -141,7 +153,7 @@ EXPOSE 8000 VOLUME ["/app/media"] USER edrn WORKDIR /app -ENTRYPOINT ["/app/bin/python3"] +ENTRYPOINT ["/usr/bin/python3"] CMD ["/usr/bin/gunicorn", "-c", "/app/gunicorn.conf.py"] HEALTHCHECK --interval=5m --timeout=2m --start-period=10m CMD /usr/bin/curl --fail --retry 6 --max-time 5 --retry-delay 10 --retry-max-time 60 http://127.0.0.1:8000/ || /bin/sh -c 'killall5 -TERM && (/bin/sleep 10; killall5 -KILL)' diff --git a/docker/docker-compose.yaml b/docker/docker-compose.yaml index 73954b66..f6f365b2 100644 --- a/docker/docker-compose.yaml +++ b/docker/docker-compose.yaml @@ -124,7 +124,7 @@ services: # # Port 6379, not published. cache: - image: redis:7.4.1-alpine3.20 + image: redis:7.0.11-alpine3.18 networks: - lattice restart: on-failure @@ -174,7 +174,7 @@ services: # Worker processes run Django functions so it needs all the same env vars as `portal`. worker: image: ${EDRN_IMAGE_OWNER-edrndocker/}edrn-portal:${EDRN_VERSION:-6.3.0-uid26013} - entrypoint: ['/app/bin/django-admin', 'worker', '--verbosity', '2'] + entrypoint: ['/usr/bin/django-admin', 'worker', '--verbosity', '2'] volumes: - type: bind diff --git a/src/edrn.collabgroups/setup.cfg b/src/edrn.collabgroups/setup.cfg index 07c494f5..e70cdedc 100644 --- a/src/edrn.collabgroups/setup.cfg +++ b/src/edrn.collabgroups/setup.cfg @@ -17,8 +17,8 @@ package_dir = packages = find_namespace: python_requires = >= 3.9 install_requires = - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 edrnsite.streams edrnsite.content diff --git a/src/edrn.metrics/setup.cfg b/src/edrn.metrics/setup.cfg index 597cfbc2..565467be 100644 --- a/src/edrn.metrics/setup.cfg +++ b/src/edrn.metrics/setup.cfg @@ -18,8 +18,8 @@ packages = find_namespace: python_requires = >= 3.9 install_requires = edrn.auth - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 [options.packages.find] diff --git a/src/edrn.theme/setup.cfg b/src/edrn.theme/setup.cfg index 08e62fa8..70d44d30 100644 --- a/src/edrn.theme/setup.cfg +++ b/src/edrn.theme/setup.cfg @@ -20,8 +20,8 @@ python_requires = >= 3.9 install_requires = edrn.auth edrnsite.controls - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 [options.packages.find] diff --git a/src/edrnsite.content/setup.cfg b/src/edrnsite.content/setup.cfg index 24bceba6..5843c350 100644 --- a/src/edrnsite.content/setup.cfg +++ b/src/edrnsite.content/setup.cfg @@ -18,13 +18,13 @@ packages = find_namespace: python_requires = >= 3.9 install_requires = edrnsite.streams - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 django-widget-tweaks ~= 1.4.12 wagtail-django-recaptcha ~= 1.0 django-recaptcha ~= 3.0.0 gdown ~= 4.7.1 - pandas ~= 2.0.3 # Must match py3-pandas package in Dockerfile + pandas ~= 1.5.3 # Must match py3-pandas package in Dockerfile # A couple of the forms in this package actually depend on eke.knowledge, but eke.knowledge depends on diff --git a/src/edrnsite.controls/setup.cfg b/src/edrnsite.controls/setup.cfg index 64c96cdc..4e6d1e30 100644 --- a/src/edrnsite.controls/setup.cfg +++ b/src/edrnsite.controls/setup.cfg @@ -17,8 +17,8 @@ package_dir = packages = find: python_requires = >= 3.9 install_requires = - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 [options.packages.find] diff --git a/src/edrnsite.ploneimport/setup.cfg b/src/edrnsite.ploneimport/setup.cfg index 10d70aa3..f33c2007 100644 --- a/src/edrnsite.ploneimport/setup.cfg +++ b/src/edrnsite.ploneimport/setup.cfg @@ -17,8 +17,8 @@ package_dir = packages = find_namespace: python_requires = >= 3.9 install_requires = - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 [options.packages.find] diff --git a/src/edrnsite.policy/setup.cfg b/src/edrnsite.policy/setup.cfg index 6e63e3cb..25ccf5e2 100644 --- a/src/edrnsite.policy/setup.cfg +++ b/src/edrnsite.policy/setup.cfg @@ -27,21 +27,21 @@ install_requires = edrnsite.ploneimport eke.biomarkers edrn.metrics - edrn.auth ~= 2.0.1 - celery[redis] ~= 5.4.0 + edrn.auth ~= 2.0.0 + celery[redis] ~= 5.2.7 dj-database-url ~= 2.1.0 - django ~= 5.0.9 - django-auth-ldap ~= 5.1.0 + django ~= 4.2.9 + django-auth-ldap ~= 4.1.0 django-celery-results ~= 2.5.1 django-redis ~= 5.4.0 - pillow ~= 10.3.0 # Must match py3-pillow package installed in Dockerfile - psycopg2 ~= 2.9.9 # Must match py3-pyscopg2 package installed in Dockerfile + pillow == 9.5.0 # Must match py3-pillow package installed in Dockerfile + psycopg2 == 2.9.6 # Must match py3-pyscopg2 package installed in Dockerfile pymemcache ~= 3.5.2 - wagtail == 5.2.6 + wagtail == 5.2.3 wagtail-favicon ~= 0.3.0 wagtail-metadata ~= 5.0.0 - tzdata == 2024.2 - wagtailmenus ~= 4.0.1 + tzdata == 2022.1 + wagtailmenus ~= 3.1.9 wagtail-robots @ git+https://github.com/unexceptable/wagtail-robots.git@9a47b6c09bec120bd5a85f4c7c1856cdc7f71f51 diff --git a/src/edrnsite.policy/src/edrnsite/policy/settings/ops.py b/src/edrnsite.policy/src/edrnsite/policy/settings/ops.py index 6c43438f..6eaee9ec 100644 --- a/src/edrnsite.policy/src/edrnsite/policy/settings/ops.py +++ b/src/edrnsite.policy/src/edrnsite/policy/settings/ops.py @@ -9,11 +9,11 @@ # Debug Mode # ---------- # -# This had better be off! +# This had better be off! TURN THIS BACK TO FALSE!!! # # πŸ”— https://docs.djangoproject.com/en/3.2/ref/settings/#debug -DEBUG = True +DEBUG = False # Secret Key diff --git a/src/edrnsite.search/setup.cfg b/src/edrnsite.search/setup.cfg index 2d9ff5a1..7ad39f5b 100644 --- a/src/edrnsite.search/setup.cfg +++ b/src/edrnsite.search/setup.cfg @@ -18,8 +18,8 @@ packages = find_namespace: python_requires = >= 3.9 install_requires = edrnsite.controls - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 elasticsearch == 7.13.4 diff --git a/src/edrnsite.streams/setup.cfg b/src/edrnsite.streams/setup.cfg index 097ac971..afd8e649 100644 --- a/src/edrnsite.streams/setup.cfg +++ b/src/edrnsite.streams/setup.cfg @@ -17,8 +17,8 @@ package_dir = packages = find_namespace: python_requires = >= 3.9 install_requires = - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 [options.packages.find] diff --git a/src/edrnsite.test/setup.cfg b/src/edrnsite.test/setup.cfg index e01b63da..14b11aeb 100644 --- a/src/edrnsite.test/setup.cfg +++ b/src/edrnsite.test/setup.cfg @@ -20,8 +20,8 @@ install_requires = selenium ~= 4.9.1 edrnsite.controls edrnsite.content - django < 6 - wagtail < 6 + django < 5, > 4 + wagtail < 6, > 5 [options.packages.find] diff --git a/src/eke.biomarkers/setup.cfg b/src/eke.biomarkers/setup.cfg index 482b9d7b..0e96f2ee 100644 --- a/src/eke.biomarkers/setup.cfg +++ b/src/eke.biomarkers/setup.cfg @@ -21,14 +21,14 @@ install_requires = eke.knowledge edrnsite.content edrn.auth - biopython ~= 1.81 # Must mathc py3-biopython package in Dockerfile - django < 6 + biopython == 1.81 # Must mathc py3-biopython package in Dockerfile + django < 5, > 4 django_plotly_dash == 1.7.1 - numpy ~= 1.25.2 # Must match py3-numpy package in Dockerfile - pandas ~= 2.0.3 # Must match py3-pandas package in Dockerfile + numpy == 1.24.4 # Must match py3-numpy package in Dockerfile + pandas == 1.5.3 # Must match py3-pandas package in Dockerfile rdflib ~= 6.1.1 # Regression in 6.2.0, see https://github.com/RDFLib/rdflib/issues/2120 sortedcontainers ~= 2.4.0 - wagtail < 6 + wagtail < 6, > 5 Werkzeug == 2.0.3 # django_plotly_dash fails with 2.1 diff --git a/src/eke.geocoding/setup.cfg b/src/eke.geocoding/setup.cfg index 46417326..3fa61e52 100644 --- a/src/eke.geocoding/setup.cfg +++ b/src/eke.geocoding/setup.cfg @@ -19,9 +19,9 @@ packages = find_namespace: python_requires = >= 3.9 install_requires = boto3 ~= 1.24.75 - django < 6 + django < 5, > 4 geocoder ~= 1.38.1 - wagtail < 6 + wagtail < 6, > 5 [options.packages.find] diff --git a/src/eke.knowledge/setup.cfg b/src/eke.knowledge/setup.cfg index e9d922d2..a219ba6f 100644 --- a/src/eke.knowledge/setup.cfg +++ b/src/eke.knowledge/setup.cfg @@ -22,19 +22,19 @@ install_requires = edrnsite.controls edrn.collabgroups eke.geocoding - biopython ~= 1.81 # Must match py3-biopython package in Dockerfile + biopython == 1.81 # Must match py3-biopython package in Dockerfile boto3 ~= 1.24.75 - celery ~= 5.4.0 + celery ~= 5.2.7 dash-dangerously-set-inner-html ~= 0.0.2 - django < 6 + django < 5, > 4 django_plotly_dash == 1.7.1 humanize ~= 4.3.0 libgravatar ~= 1.0.4 - numpy ~= 1.25.2 # Must match py3-numpy package in Dockerfile - pandas ~= 2.0.3 # Must match py3-pandas package in Dockerfile + numpy == 1.24.4 # Must match py3-numpy package in Dockerfile + pandas == 1.5.3 # Must match py3-pandas package in Dockerfile rdflib == 6.1.1 # Regression in 6.2.0, see https://github.com/RDFLib/rdflib/issues/2120 sortedcontainers ~= 2.4.0 - wagtail < 6 + wagtail < 6, > 5 Werkzeug == 2.0.3 # django_plotly_dash fails with 2.1 [options.packages.find] diff --git a/src/eke.knowledge/src/eke/knowledge/sciencedata.py b/src/eke.knowledge/src/eke/knowledge/sciencedata.py index da73af91..09d7a38b 100644 --- a/src/eke.knowledge/src/eke/knowledge/sciencedata.py +++ b/src/eke.knowledge/src/eke/knowledge/sciencedata.py @@ -277,6 +277,8 @@ def faceted_markup(self, request): return ''.join(rows) def get_context(self, request: HttpRequest, *args, **kwargs) -> dict: + app = DjangoDash('ScienceDataDashboard') # ← referenced in data-collection-index.html + context = super().get_context(request, *args, **kwargs) context['statistics'] = DataStatistic.objects.child_of(self).order_by('title') matches = context['knowledge_objects'] @@ -317,7 +319,6 @@ def get_context(self, request: HttpRequest, *args, **kwargs) -> dict: cats_figure.update_layout(showlegend=False, margin=dict(l=20, r=20, t=40, b=20)) cats_legend = ghetto_plotly_legend([i[0] for i in c.most_common()], palette) - app = DjangoDash('ScienceDataDashboard') # ← referenced in data-collection-index.html app.layout = html.Div(className='container', children=[ html.Div(className='row', children=[ html.Div(className='col-md-4', children=[ diff --git a/support/cbiit-deploy-prod.sh b/support/cbiit-deploy-prod.sh index 51f2a83f..49750886 100755 --- a/support/cbiit-deploy-prod.sh +++ b/support/cbiit-deploy-prod.sh @@ -129,10 +129,10 @@ bzip2 --decompress --stdout /local/content/edrn/database-access/edrn.sql.bz2 | \ echo "" echo "πŸ“€ Initial database setup" ssh -q $USER@$WEBSERVER "cd $WEBROOT ; \ -docker compose --project-name edrn exec portal /app/bin/django-admin makemigrations &&\ -docker compose --project-name edrn exec portal /app/bin/django-admin migrate &&\ -docker compose --project-name edrn exec portal /app/bin/django-admin fixtree &&\ -docker compose --project-name edrn exec portal /app/bin/django-admin collectstatic --no-input --clear" || exit 1 +docker compose --project-name edrn exec portal /usr/bin/django-admin makemigrations &&\ +docker compose --project-name edrn exec portal /usr/bin/django-admin migrate &&\ +docker compose --project-name edrn exec portal /usr/bin/django-admin fixtree &&\ +docker compose --project-name edrn exec portal /usr/bin/django-admin collectstatic --no-input --clear" || exit 1 echo "" echo "πŸ€·β€β™€οΈ Restarting the portal and stopping search engine" @@ -145,7 +145,7 @@ docker compose --project-name edrn start portal" || exit 1 echo "" echo "πŸ†™ Applying upgrades" ssh -q $USER@$WEBSERVER "cd $WEBROOT ; \ -docker compose --project-name edrn exec portal /app/bin/django-admin copy_daily_hits_from_wagtailsearch" || exit 1 +docker compose --project-name edrn exec portal /usr/bin/django-admin copy_daily_hits_from_wagtailsearch" || exit 1 echo "" echo "πŸ€·β€β™€οΈ Final portal restart and restart of search engine" diff --git a/support/cbiit-deploy.sh b/support/cbiit-deploy.sh index 91004d89..5b14952b 100755 --- a/support/cbiit-deploy.sh +++ b/support/cbiit-deploy.sh @@ -130,11 +130,11 @@ bzip2 --decompress --stdout edrn.sql.bz2 | \ echo "" echo "πŸ“€ Initial database setup" ssh -q $USER@$WEBSERVER "cd $WEBROOT ; \ -docker compose --project-name edrn exec portal /app/bin/django-admin makemigrations &&\ -docker compose --project-name edrn exec portal /app/bin/django-admin migrate &&\ -docker compose --project-name edrn exec portal /app/bin/django-admin fixtree &&\ -docker compose --project-name edrn exec portal /app/bin/django-admin collectstatic --no-input --clear &&\ -docker compose --project-name edrn exec portal /app/bin/django-admin edrndevreset" || exit 1 +docker compose --project-name edrn exec portal /usr/bin/django-admin makemigrations &&\ +docker compose --project-name edrn exec portal /usr/bin/django-admin migrate &&\ +docker compose --project-name edrn exec portal /usr/bin/django-admin fixtree &&\ +docker compose --project-name edrn exec portal /usr/bin/django-admin collectstatic --no-input --clear &&\ +docker compose --project-name edrn exec portal /usr/bin/django-admin edrndevreset" || exit 1 echo "" echo "πŸ€·β€β™€οΈ Restarting the portal and stopping search engine" ssh -q $USER@$WEBSERVER "cd $WEBROOT ; \ @@ -146,7 +146,7 @@ docker compose --project-name edrn start portal" || exit 1 echo "" echo "πŸ†™ Applying upgrades" ssh -q $USER@$WEBSERVER "cd $WEBROOT ; \ -docker compose --project-name edrn exec portal /app/bin/django-admin copy_daily_hits_from_wagtailsearch" || exit 1 +docker compose --project-name edrn exec portal /usr/bin/django-admin copy_daily_hits_from_wagtailsearch" || exit 1 echo "" echo "πŸ€·β€β™€οΈ Final portal restart and restart of search engine"