Skip to content

Commit

Permalink
updates and reduce size
Browse files Browse the repository at this point in the history
  • Loading branch information
jensens committed Aug 14, 2024
1 parent fd36a9a commit 0f66c8f
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
17 changes: 12 additions & 5 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 &&\
Expand Down
2 changes: 1 addition & 1 deletion frontend/mrs.developer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"package": "@plone/volto",
"url": "[email protected]:plone/volto.git",
"https": "https://github.com/plone/volto.git",
"tag": "18.0.0-alpha.41"
"tag": "18.0.0-alpha.42"
}
}

0 comments on commit 0f66c8f

Please sign in to comment.