-
-
Notifications
You must be signed in to change notification settings - Fork 196
Document how to pack the ZODB when using containers #1886
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
Merged
Merged
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
83ecf32
Fix broken glossary entry (#1884)
stevepiercy 7fc409d
add recipe to pack the ZODB
erral 1c79ac7
Merge branch '6.0' into erral-zodbpack
stevepiercy 940692a
Update docs/install/containers/recipes/index.md
erral 531b3d2
Apply suggestions from code review
erral d568d95
Merge branch '6.0' into erral-zodbpack
stevepiercy File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -118,3 +118,41 @@ RUN <<EOT | |
|
|
||
| After making these changes, build the project container as usual. | ||
| It will no longer output the access log, but will continue to output the event log. | ||
|
|
||
|
|
||
| ## Pack the ZODB | ||
|
|
||
| A common maintenance task of a Plone instance is to pack the ZODB. | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The official `plone/plone-backend` container and project containers based on them have a `pack` command to pack the ZODB. | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
erral marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| The command will work on standalone mode, ZEO mode and Relstorage mode (with Posgres). | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| To run the command you have to run your container passing the command: | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| In standalone mode you will have a volume mounting the ZODB, so it will be something like: | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| docker run -v /path/to/your/volume:/data plone/plone-backend pack | ||
| ``` | ||
|
|
||
| In ZEO mode, you will have to run it next to your ZEO instance: | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| docker run -e ZEO_ADDRESS=zeo:8100 --link zeo plone/plone-backend pack | ||
| ``` | ||
|
|
||
| In Relstorage, you will need to pass the connection DSN: | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| docker run -e RELSTORAGE_DSN="dbname='plone' user='plone' host='db' password='password' port='5432'" pack | ||
| ``` | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In Docker Swarm, it's also necessary to specify the network if the database is only available on an internal network. It might be easier to use |
||
|
|
||
| If you are running your containers using docker compose, the command is much easier: | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ``` | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| docker compose run backend pack | ||
| ``` | ||
|
|
||
| Provided that the name of the service that runs the Plone instance is `backend`, otherwise exchange `backend` with your container's name. | ||
erral marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
@erral @davisagli would this section be more appropriate under the existing Advanced usage in
plone/plone-backend?