-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Conversation
There was a problem hiding this 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]>
There was a problem hiding this 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 |
There was a problem hiding this comment.
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!
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.