Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command for packing the ZODB [6.1.x] #179

Merged
merged 4 commits into from
Mar 6, 2025
Merged

Conversation

erral
Copy link
Member

@erral erral commented Feb 28, 2025

Fixes #104

I have locally tested with a plain container, using ZEO and also using Relstorage with Postgres and it works.

But I would like someone else to test with Relstorage, as I don't have any experience with it.

@erral erral changed the title Add command for packing the ZODB Add command for packing the ZODB [6.1.x] Feb 28, 2025
Copy link
Member

@jensens jensens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (so, I did not try it)

Co-authored-by: Steve Piercy <[email protected]>
Copy link
Member

@nileshgulia1 nileshgulia1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I build this locally and tested with our eeacms/postgres image as we used zodbpack in one of our cron schedule recently.

@@ -163,6 +163,14 @@ elif [[ "$1" == "run" ]]; then
exec $sudo $VENVBIN/zconsole run etc/${CONF} "${@:2}"
elif [[ "$1" == "addzopeuser" ]]; then
exec $sudo $VENVBIN/addzopeuser -c etc/${CONF} "${@:2}"
elif [[ "$1" == "pack" ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't tell what command provides the parameter $1. Is it make or something else? In any case, docs please!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevepiercy This is a bash script, and it's just plain Bash. The first argument to the command is available as $1. So this runs if the user called this script using ./docker-entrypoint.sh pack

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davisagli gotcha. So cd skeleton && ./docker-entrypoint.sh pack should do the job? Let's get some docs of its complete usage. @erral has an open PR to put it as a recipe, but I think it should go in the existing Advanced usage in plone/plone-backend.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@stevepiercy No, there is no situation where that's what you would do. The skeleton folder is here in the repository and is the source for files that go in the image, but there is no skeleton folder in the image itself.

It will be easiest to run this command in an already running plone-backend container with docker exec -it [container id] ./docker-entrypoint.sh pack.

In a Docker Swarm configuration it's also possible to set up a separate service which is triggered periodically using https://github.com/crazy-max/swarm-cronjob

The whole containers section needs a complete reorganization, so I'm not going to get hung up on where it goes for now.

@erral erral requested a review from davisagli March 6, 2025 09:23
@davisagli davisagli merged commit babc92e into 6.1.x Mar 6, 2025
3 checks passed
@davisagli davisagli deleted the erral-zodbpack-6.1.x branch March 6, 2025 19:45
davisagli added a commit that referenced this pull request Mar 6, 2025
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.

Add command for packing the ZODB
5 participants