Add zodb-pgjsonb based storage support#209
Conversation
|
Would be easier to use env vars with cookiecutter-zope-instance plus helpers in the entrypoint, see https://plone.github.io/cookiecutter-zope-instance/how-to/use-environment-variables.html However, this would be a breaking change here and probably worth a PLIP. So back to reality: Given the limitations how this image built is designed yours is the best and a valid solution to add a new config variants here. |
|
This is very cool, thank you for the contribution. 😍 We likely can’t test it until we merge and rebuild / release, or? Also needs an update to docs after testing/feedback. |
Yes, it is hard to test. That's why I built locally the images with the said changes and pushed to our container-registry here in GitHub and I am basing a project's Dockerfile on those. # syntax=docker/dockerfile:1
ARG PLONE_VERSION=6.2.0rc1
FROM ghcr.io/codesyntax/plone-backend/server-builder:${PLONE_VERSION}-pgjsonb-1 AS builder
RUN apt-get update && apt-get install -y openssh-client git
RUN mkdir -p ~/.ssh && echo "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config
WORKDIR /app
# Add local code
COPY scripts/ scripts/
COPY . src
COPY zope.ini etc/
# Install local requirements and pre-compile mo files
RUN --mount=type=ssh,id=default <<EOT
set -e
bin/pip install mxdev uv
sed -i 's/-e .\[test\]/./g' src/mx.ini
cd /app/src
# remove potentially existing virtualenv from local build
rm -rf .venv
../bin/mxdev -c mx.ini
../bin/uv pip install -r requirements-mxdev.txt
../bin/python /compile_mo.py
EOT
FROM ghcr.io/codesyntax/plone-backend/server-prod-config:${PLONE_VERSION}-pgjsonb-1
LABEL maintainer="CodeSyntax <plone@codesyntax.com>" \
org.label-schema.name="codesyntax-web-backend" \
org.label-schema.description="codesyntax backend image." \
org.label-schema.vendor="CodeSyntax"
# Copy /app from builder
COPY --from=builder /app /app
RUN --mount=type=ssh,id=default <<EOT
set -e
ln -s /data /app/var
EOT
The container-registry is public here on GitHub, so you can test it if you want. |
Updated comments in docker-entrypoint.sh for clarity.
If your pull request closes an open issue, include the exact text below, immediately followed by the issue number. When your pull request gets merged, then that issue will close automatically.
Closes #
See documentation changes at: plone/documentation#2081