1
1
---
2
2
myst :
3
3
html_meta :
4
- " description " : " Very simple Plone 6 setup with only one backend and data being persisted in a Docker volume."
5
- " property=og:description " : " Very simple Plone 6 setup with only one backend and data being persisted in a Docker volume."
4
+ " description " : " Basic Plone 6 setup with only one backend, a ZEO server, and data being persisted in a Docker volume."
5
+ " property=og:description " : " Basic Plone 6 setup with only one backend, a ZEO server, and data being persisted in a Docker volume."
6
6
" property=og:title " : " Traefik Proxy, Frontend, Backend, Varnish container example"
7
7
" keywords " : " Plone 6, Container, Docker, Traefik Proxy, Frontend, Backend, Varnish"
8
8
---
9
9
10
- # Traefik Proxy, Frontend, Backend, Varnish container example
10
+ # Traefik Proxy, Frontend, Backend, ZEO, Varnish container example
11
11
12
- This example is a very simple setup with one backend and data being persisted in a Docker volume.
12
+ This example is a basic setup with one backend accessing a ZEO server and data being persisted in a Docker volume.
13
13
14
14
{term}` Traefik Proxy ` in this example is used as a reverse proxy.
15
15
@@ -323,7 +323,6 @@ You can either use `localhost`, or add it in your `/etc/hosts` file or DNS to po
323
323
Now let's create a {file}` docker-compose.yml ` file:
324
324
325
325
``` yaml
326
- version : " 3"
327
326
services :
328
327
webserver :
329
328
image : traefik
@@ -381,7 +380,7 @@ services:
381
380
- traefik.http.routers.rt-frontend-public.service=svc-varnish
382
381
- traefik.http.routers.rt-frontend-public.middlewares=gzip
383
382
# Router: Internal
384
- - traefik.http.routers.rt-frontend-internal.rule=Host(`plone.localhost`) && Headers (`X-Varnish-Routed`, `1`)
383
+ - traefik.http.routers.rt-frontend-internal.rule=Host(`plone.localhost`) && Header (`X-Varnish-Routed`, `1`)
385
384
- traefik.http.routers.rt-frontend-internal.entrypoints=http
386
385
- traefik.http.routers.rt-frontend-internal.service=svc-frontend
387
386
depends_on :
@@ -394,6 +393,21 @@ services:
394
393
environment :
395
394
SITE : Plone
396
395
PROFILES : " plone.app.caching:with-caching-proxy"
396
+ environment :
397
+ ZEO_ADDRESS : db:8100
398
+ ZEO_SHARED_BLOB_DIR : on # otherwise the backend will create its own blob storage
399
+ volumes :
400
+ - data:/data # the backend and database need access to the same volume
401
+ ports :
402
+ - 8080:8080
403
+ depends_on :
404
+ - db
405
+ # If the Docker container is run with a UID other than the UID which owns the local file system persistent storage,
406
+ # explicitly make the container run with the correct UID. For example, `user: 1000:1000`.
407
+ # In that case, also make sure that the `db` service gets the same `user: 1000:1000` configuration,
408
+ # as they both need access to the file system.
409
+
410
+
397
411
labels :
398
412
- traefik.enable=true
399
413
- traefik.constraint-label=public
@@ -414,12 +428,12 @@ services:
414
428
- traefik.http.routers.rt-backend-api-public.middlewares=gzip
415
429
# Router: Internal
416
430
# # /++api++/
417
- - traefik.http.routers.rt-backend-api-internal.rule=Host(`plone.localhost`) && PathPrefix(`/++api++`) && Headers (`X-Varnish-Routed`, `1`)
431
+ - traefik.http.routers.rt-backend-api-internal.rule=Host(`plone.localhost`) && PathPrefix(`/++api++`) && Header (`X-Varnish-Routed`, `1`)
418
432
- traefik.http.routers.rt-backend-api-internal.entrypoints=http
419
433
- traefik.http.routers.rt-backend-api-internal.service=svc-backend
420
434
- traefik.http.routers.rt-backend-api-internal.middlewares=gzip,mw-backend-vhm-api
421
435
# # /ClassicUI/
422
- - traefik.http.routers.rt-backend-ui-internal.rule=Host(`plone.localhost`) && PathPrefix(`/ClassicUI`) && Headers (`X-Varnish-Routed`, `1`)
436
+ - traefik.http.routers.rt-backend-ui-internal.rule=Host(`plone.localhost`) && PathPrefix(`/ClassicUI`) && Header (`X-Varnish-Routed`, `1`)
423
437
- traefik.http.routers.rt-backend-ui-internal.entrypoints=http
424
438
- traefik.http.routers.rt-backend-ui-internal.service=svc-backend
425
439
- traefik.http.routers.rt-backend-ui-internal.middlewares=gzip,mw-backend-vhm-ui
@@ -452,6 +466,16 @@ services:
452
466
- " 8000-8001:80"
453
467
depends_on :
454
468
- backend
469
+
470
+ db :
471
+ image : plone/plone-zeo:latest
472
+ volumes :
473
+ - data:/data
474
+ ports :
475
+ - " 8100:8100"
476
+
477
+ volumes :
478
+ data : {}
455
479
` ` `
456
480
457
481
0 commit comments