collective.regenv
Override registry settings using environment variables.
collective.regenv
Override Plone registry settings with environment variables.
Features
Using this product you can:
have different values for development and production environments (think about the
MailHostsettings, connection parameters to external services, etc.)have different values for different instances in the same buildout, allowing for example to toggle features on and off for A/B testing.
Installation
Install collective.regenv with pip:
pip install collective.regenv
And to create the Plone site:
make create-site
Usage
Registry overrides should be in a YAML file:
defaults: &defaults
plone.cachepurging.interfaces.ICachePurgingSettings.cachingProxies:
- http://localhost:8000
- http://localhost:8001
plone.app.theming.interfaces.IThemeSettings.hostnameBlacklist:
- 127.0.0.1
- localhost
/Plone/portal_registry:
<<: *defaults
/Plone2/portal_registry:
<<: *defaults
plone.cachepurging.interfaces.ICachePurgingSettings.cachingProxies:
- http://localhost:9000
/Plone/acl_users/oidc:
issuer:
http://localhost:1234/realms/plone/
client_id:
plone
Run zope instance with environment pointing to the YAML file, for example
PLONE_REGISTRY_YAML=$(pwd)/sample.yaml bin/instance fg
Or using the docker image, for example::
docker run -p 8080:8080 \
-e ADDONS=collective.regenv \
-e PLONE_REGISTRY_YAML=/app/registry.yaml \
-v$(pwd)/sample.yaml:/app/registry.yaml \
plone/plone-backend:latest
Alternatively you can add the contents of the YAML file in an environment variable called PLONE_REGISTRY_YAML_CONTENT and pass the values directly.
This way you do not need to mount a volume with the configuration file.
For example:
export PLONE_REGISTRY_YAML_CONTENT=$(cat sample.yaml)
docker run -p 8080:8080 \
-e ADDONS=collective.regenv \
-e PLONE_REGISTRY_YAML_CONTENT
plone/plone-backend:latest
Contribute
Prerequisites ✅
- An operating system that runs all the requirements mentioned.
- uv
- Make
- Git
- Docker (optional)
Installation 🔧
Clone this repository, then change your working directory.
git clone git@github.com:collective/collective.regenv.git cd collective.regenvInstall this code base.
make install
License
The project is licensed under GPLv2.
Credits and acknowledgements 🙏
Generated using Cookieplone (0.9.10) and cookieplone-templates (44f4a49) on 2026-02-20 17:38:38.334208. A special thanks to all contributors and supporters!