Skip to content

Commit 06b1f17

Browse files
update docker examples for Varnish3, remove obsolete 'version' yaml (#1963)
* update docker examples for Varnish3, remove obsolete 'version' yaml * change 'simple' to basic "nothing is simple when Varnish is involved" * Update docs/install/containers/examples/nginx-volto-plone-zeo.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/nginx-volto-plone-zeo.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/traefik-volto-plone-varnish.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/traefik-volto-plone-varnish.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/traefik-volto-plone-varnish.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/traefik-volto-plone-varnish.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/traefik-volto-plone-varnish.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/traefik-volto-plone-varnish.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/traefik-volto-plone-varnish.md Co-authored-by: Steve Piercy <[email protected]> * Update docs/install/containers/examples/traefik-volto-plone-varnish.md Co-authored-by: Steve Piercy <[email protected]> --------- Co-authored-by: Steve Piercy <[email protected]>
1 parent 449fb4f commit 06b1f17

File tree

5 files changed

+35
-12
lines changed

5 files changed

+35
-12
lines changed

docs/install/containers/examples/nginx-plone.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ You can either use `plone.localhost`, or add it in your `/etc/hosts` file or DNS
6969
Now let's create a `docker-compose.yml` file:
7070

7171
```yaml
72-
version: "3"
7372
services:
7473

7574
webserver:

docs/install/containers/examples/nginx-volto-plone-postgresql.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ You can either use `localhost`, or add it in your `/etc/hosts` file or DNS to po
8383
Now let's create a `docker-compose.yml` file:
8484

8585
```yaml
86-
version: "3"
8786
services:
8887

8988
webserver:

docs/install/containers/examples/nginx-volto-plone-zeo.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ You can either use `localhost`, or add it in your `/etc/hosts` file or DNS to po
8383
Now let's create a `docker-compose.yml` file:
8484

8585
```yaml
86-
version: "3"
8786
services:
8887

8988
webserver:
@@ -110,6 +109,9 @@ services:
110109
environment:
111110
SITE: Plone
112111
ZEO_ADDRESS: db:8100
112+
ZEO_SHARED_BLOB_DIR: on # otherwise the backend will create its own blob storage
113+
volumes:
114+
- data:/data # the backend and database need access to the same volume
113115
ports:
114116
- "8080:8080"
115117
depends_on:

docs/install/containers/examples/nginx-volto-plone.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ You can either use `localhost`, or add it in your `/etc/hosts` file or DNS to po
8181
Now let's create a `docker-compose.yml` file:
8282

8383
```yaml
84-
version: "3"
8584
services:
8685

8786
webserver:

docs/install/containers/examples/traefik-volto-plone-varnish.md

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
---
22
myst:
33
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."
66
"property=og:title": "Traefik Proxy, Frontend, Backend, Varnish container example"
77
"keywords": "Plone 6, Container, Docker, Traefik Proxy, Frontend, Backend, Varnish"
88
---
99

10-
# Traefik Proxy, Frontend, Backend, Varnish container example
10+
# Traefik Proxy, Frontend, Backend, ZEO, Varnish container example
1111

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.
1313

1414
{term}`Traefik Proxy` in this example is used as a reverse proxy.
1515

@@ -323,7 +323,6 @@ You can either use `localhost`, or add it in your `/etc/hosts` file or DNS to po
323323
Now let's create a {file}`docker-compose.yml` file:
324324

325325
```yaml
326-
version: "3"
327326
services:
328327
webserver:
329328
image: traefik
@@ -381,7 +380,7 @@ services:
381380
- traefik.http.routers.rt-frontend-public.service=svc-varnish
382381
- traefik.http.routers.rt-frontend-public.middlewares=gzip
383382
# 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`)
385384
- traefik.http.routers.rt-frontend-internal.entrypoints=http
386385
- traefik.http.routers.rt-frontend-internal.service=svc-frontend
387386
depends_on:
@@ -394,6 +393,21 @@ services:
394393
environment:
395394
SITE: Plone
396395
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+
397411
labels:
398412
- traefik.enable=true
399413
- traefik.constraint-label=public
@@ -414,12 +428,12 @@ services:
414428
- traefik.http.routers.rt-backend-api-public.middlewares=gzip
415429
# Router: Internal
416430
## /++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`)
418432
- traefik.http.routers.rt-backend-api-internal.entrypoints=http
419433
- traefik.http.routers.rt-backend-api-internal.service=svc-backend
420434
- traefik.http.routers.rt-backend-api-internal.middlewares=gzip,mw-backend-vhm-api
421435
## /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`)
423437
- traefik.http.routers.rt-backend-ui-internal.entrypoints=http
424438
- traefik.http.routers.rt-backend-ui-internal.service=svc-backend
425439
- traefik.http.routers.rt-backend-ui-internal.middlewares=gzip,mw-backend-vhm-ui
@@ -452,6 +466,16 @@ services:
452466
- "8000-8001:80"
453467
depends_on:
454468
- 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: {}
455479
```
456480
457481

0 commit comments

Comments
 (0)