Skip to content

Add zodb-pgjsonb based storage support#209

Open
erral wants to merge 5 commits into
6.2.xfrom
erral-pgjsonb-support
Open

Add zodb-pgjsonb based storage support#209
erral wants to merge 5 commits into
6.2.xfrom
erral-pgjsonb-support

Conversation

@erral
Copy link
Copy Markdown
Member

@erral erral commented May 7, 2026

  • I signed and returned the Plone Contributor Agreement, and received and accepted an invitation to join a team in the Plone GitHub organization.
  • I verified there aren't any other open pull requests for the same change.
  • I followed the guidelines in Contributing to Plone.
  • I successfully ran code quality checks on my changes locally.
  • I successfully ran tests on my changes locally.
  • If needed, I added new tests for my changes.
  • If needed, I added documentation for my changes.
  • I included a change log entry in my commits.

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

@jensens
Copy link
Copy Markdown
Member

jensens commented May 8, 2026

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.

@fredvd
Copy link
Copy Markdown
Member

fredvd commented May 8, 2026

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.

@erral
Copy link
Copy Markdown
Member Author

erral commented May 9, 2026

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.

Comment thread skeleton/docker-entrypoint.sh Outdated
Updated comments in docker-entrypoint.sh for clarity.
@erral erral deployed to DOCKER_HUB May 12, 2026 08:30 — with GitHub Actions Active
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants