Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Steve Piercy <[email protected]>
  • Loading branch information
erral and stevepiercy authored Mar 6, 2025
1 parent 940692a commit 531b3d2
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions docs/install/containers/recipes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,35 +126,35 @@ A common maintenance task of a Plone instance is to [pack the ZODB](https://zodb
Packing removes old revisions of objects.
It is similar to [routine vacuuming in PostgreSQL](https://www.postgresql.org/docs/8.3/routine-vacuuming.html).

The official `plone/plone-backend` container and project containers based on them have a `pack` command to pack the ZODB.
The official {doc}`/install/containers/images/backend` container and project containers based on them have a `pack` command to pack the ZODB.
The command will work in standalone mode, ZEO mode, and RelStorage mode but only with PostgreSQL.

The command will work on standalone mode, ZEO mode and Relstorage mode (with Posgres).
Invoke the command in a running container by passing in the appropriate command for the mode.

To run the command you have to run your container passing the command:
In standalone mode, ZODB is in a mounted volume, so the command would be similar to the following.

In standalone mode you will have a volume mounting the ZODB, so it will be something like:

```
```shell
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:
In ZEO mode, run the command next to your ZEO instance.

```
```shell
docker run -e ZEO_ADDRESS=zeo:8100 --link zeo plone/plone-backend pack
```

In Relstorage, you will need to pass the connection DSN:
In RelStorage mode, pass the connection DSN.

```
```shell
docker run -e RELSTORAGE_DSN="dbname='plone' user='plone' host='db' password='password' port='5432'" pack
```

If you are running your containers using docker compose, the command is much easier:
In running containers that use Docker Compose, the command is less complicated.

```
```shell
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.
The above command assumes that the service that runs the Plone instance is named `backend`.
Otherwise replace `backend` with your container's name.

0 comments on commit 531b3d2

Please sign in to comment.