You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| Environment variable | Description | Default value |
187
194
| --- | --- | --- |
@@ -192,8 +199,18 @@ The following is a list of supported environment variables for Relstorage:
192
199
|`CORS_ALLOW_HEADERS`| A comma separated list of request headers allowed to be sent by the client, for example `X-My-Header`|`Accept,Authorization,Content-Type,X-Custom-Header`|
193
200
|`CORS_MAX_AGE`| Indicates how long the results of a preflight request can be cached |`3600`|
194
201
202
+
Used to configure [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS)
203
+
204
+
### Add-on variables
195
205
196
-
### Add-on installation
206
+
| Environment variable | Description | Details |
207
+
| --- | --- | --- |
208
+
|`ADDONS`| A space separated list of python libraries to install |[Add-ons](#add-ons)|
209
+
|`DEVELOP`| A space separated list of python libraries to install in editable mode |[Developing packages](#developing-packages)|
210
+
|`PIP_PARAMS`| Parameters used in `pip` installation commands ||
211
+
212
+
213
+
#### Add-ons
197
214
198
215
It is possible to install add-ons during startup time in a container created using this image.
199
216
To do so, pass the `ADDONS` environment variable with a space separated list of requirements to be added to the image:
@@ -214,7 +231,7 @@ In this case, extend the image as explained before.
214
231
```
215
232
216
233
217
-
### Developing packages
234
+
####Developing packages
218
235
219
236
It is possible to install local packages instead of packages from pip.
220
237
To do so, pass the `DEVELOP` environment variable with a space separated list of paths to Python packages to be installed.
@@ -235,14 +252,17 @@ We advise against using this feature on production environments.
This image supports ZEO clusters as a simple way to allow horizontal scaling of the backend.
284
-
To use it, create a directory for your project, and inside it create a `docker-compose.yml` file that starts your Plone instance and the ZEO instance with volume mounts for data persistence.
285
-
HAProxy is used for load balancing in this example.
286
-
287
-
```yaml
288
-
version: "3"
289
-
services:
290
-
291
-
lb:
292
-
image: plone/plone-haproxy
293
-
depends_on:
294
-
- backend
295
-
ports:
296
-
- "8080:8080"
297
-
- "1936:1936"
298
-
environment:
299
-
FRONTEND_PORT: "8080"
300
-
BACKENDS: "backend"
301
-
BACKENDS_PORT: "8080"
302
-
DNS_ENABLED: "True"
303
-
HTTPCHK: "GET /"
304
-
INTER: "5s"
305
-
LOG_LEVEL: "info"
306
-
307
-
backend:
308
-
image: plone/plone-backend:6.0.0a4
309
-
restart: always
310
-
environment:
311
-
ZEO_ADDRESS: zeo:8100
312
-
ports:
313
-
- "8080"
314
-
depends_on:
315
-
- zeo
316
-
317
-
zeo:
318
-
image: plone/plone-zeo:latest
319
-
restart: always
320
-
volumes:
321
-
- data:/data
322
-
ports:
323
-
- "8100"
324
-
325
-
volumes:
326
-
data: {}
327
-
```
328
-
329
-
Now run `docker-compose up -d --scale backend=4` from your project directory.
330
-
331
-
Point your browser at `http://localhost:8080`, using the username and password combination of `admin` and `admin`, and you should see the default Plone site creation page.
332
-
333
-
Point your browser at `http://localhost:1936`, using the username and password combination of `admin` and `admin`, and you should see HAProxy statistics for your Plone cluster.
303
+
This image supports ZEO clusters as a simple way to allow horizontal scaling of the backend. Check the example page: {doc}`/volto/configuration/environmentvariables`.
0 commit comments