Skip to content

Commit 959c21c

Browse files
authored
Document the package-includes feature too.
Had this for a while, never actually saw documentation for it.
1 parent bf8e6d5 commit 959c21c

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

docs/install/containers/images/backend.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ Plone 6 example:
6565
docker run -p 8081:8081 -e LISTEN_PORT=8081 plone/plone-backend:{PLONE_BACKEND_VERSION}
6666
```
6767

68-
#### Adding configuration to `zope.conf`
68+
#### Adding configuration to `zope.conf` or additional ZCML
6969

70-
It is not possible to add configuration fragments to `zope.conf` directly, like
71-
it is with the `buildout` deployment method. However, you can derive your own
72-
container image, and drop in configuration fragments. See *Extending from this
73-
image* below for instructions.
70+
With the standard container, it is not possible to add configuration fragments to
71+
`zope.conf` directly or add extra ZCML, like it is with the `buildout` deployment
72+
method. However, you can derive your own container image, and drop in configuration
73+
fragments. See *Extending from this image* below for instructions.
7474

7575
### Site creation variables
7676

@@ -325,6 +325,21 @@ COPY /etc/zope.conf.d/*.conf /app/etc/zope.conf.d/
325325
This ensures your fragments are deployed in the `zope.conf.d` folder, which then
326326
will be used to amend the `zope.conf` file prior to starting Plone.
327327

328+
### Adding ZCML fragments
329+
330+
In the directory containing your `Dockerfile`, create a folder `etc/package-includes`.
331+
Add your ZCML configuration fragments (named `*-meta.zcml`, `*-configure.zcml`,
332+
`*-overrides.zcml`) as files in that folder.
333+
334+
Now add the following to your `Dockerfile`:
335+
336+
```Dockerfile
337+
COPY /etc/package-includes/*.zcml /app/etc/package-includes/
338+
```
339+
340+
Your ZCML fragments will be copied into the container and automatically included
341+
when Plone starts.
342+
328343
## Advanced usage
329344

330345

0 commit comments

Comments
 (0)