From 0f66c8f343b42466ad9a783be8587381293006f3 Mon Sep 17 00:00:00 2001 From: "Jens W. Klein" Date: Wed, 14 Aug 2024 17:00:47 +0200 Subject: [PATCH] updates and reduce size --- backend/Dockerfile | 17 ++++++++++++----- frontend/mrs.developer.json | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 67d7df7..cb6a1e2 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -31,21 +31,27 @@ ENV INSTANCE_debug_mode "false" # prepare and cleanup RUN \ useradd --system -m -d /app -U -u 500 plone &&\ - apt-get -y update &&\ + apt-get update &&\ apt-get -y upgrade &&\ - buildDeps="build-essential make busybox ca-certificates curl git gosu libbz2-dev libffi-dev libjpeg62-turbo-dev libmagic1 libldap2-dev libopenjp2-7-dev libpcre3-dev libpq-dev libsasl2-dev libssl-dev libtiff5-dev libxml2-dev libxslt1-dev wget zlib1g-dev" &&\ - apt-get -y install --no-install-recommends $buildDeps &&\ + buildDeps="make busybox ca-certificates curl git gosu libmagic1 wget" &&\ + apt-get install -y --no-install-recommends $buildDeps &&\ busybox --install -s &&\ - apt-get -y clean &&\ # global uv pip install uv &&\ # create venv for plone uv venv /venv &&\ + # install psycopg2, needs buildessential libpq-dev + psycopg2Deps="build-essential libpq-dev" &&\ + apt-get install -y --no-install-recommends $psycopg2Deps &&\ + uv pip install -p /venv/bin/python psycopg2 &&\ + apt-get remove -y $psycopg2Deps &&\ + apt-get autoremove -y &&\ # create a data folder mkdir /instance &&\ # give permissions chown -R plone:plone /venv /instance &&\ # cleanup + apt-get -y clean &&\ pip cache purge USER plone @@ -54,9 +60,10 @@ USER plone COPY --chown=plone:plone ./backend /site WORKDIR /site RUN \ + sed -i 's/\[test\]/\[production\]/g' /site/requirements.txt &&\ ls -la &&\ make packages cookiecutter &&\ - mkdir -p /site/deployment &&\ + mkdir /site/deployment &&\ wget -O $ZOPE_TEMPLATE https://github.com/plone/cookiecutter-zope-instance/archive/refs/tags/${COOKIECUTTER_ZOPE_INSTANCE_VERSION}.zip &&\ wget -O deployment/transform_from_environment.py https://raw.githubusercontent.com/plone/cookiecutter-zope-instance/${COOKIECUTTER_ZOPE_INSTANCE_VERSION}/helpers/transform_from_environment.py &&\ chmod u+x deployment/transform_from_environment.py &&\ diff --git a/frontend/mrs.developer.json b/frontend/mrs.developer.json index e3e6446..1453f74 100644 --- a/frontend/mrs.developer.json +++ b/frontend/mrs.developer.json @@ -4,6 +4,6 @@ "package": "@plone/volto", "url": "git@github.com:plone/volto.git", "https": "https://github.com/plone/volto.git", - "tag": "18.0.0-alpha.41" + "tag": "18.0.0-alpha.42" } }