Skip to content

Commit 62b7ff2

Browse files
authored
Merge pull request plone#1249 from valentinab25/6-dev
Docker install documentation review
2 parents 32466f9 + 205db35 commit 62b7ff2

File tree

9 files changed

+246
-105
lines changed

9 files changed

+246
-105
lines changed
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
html_meta:
3+
"description": "Simple Plone 6 setup with scalable backend and data being persisted in a Zeo volume."
4+
"property=og:description": "Simple Plone 6 setup with scalable backend and data being persisted in a Zeo volume."
5+
"property=og:title": "HAproxy, Backend, ZEO container example"
6+
"keywords": "Plone 6, Container, Docker, HAproxy, Zeo"
7+
---
8+
9+
# Haproxy, Backend, ZEO container example
10+
11+
Very simple setup with only one or more backend instances accessing a ZEO server and data being persisted in a Docker volume.
12+
13+
HAProxy is used for load balancing in this example.
14+
15+
## Setup
16+
17+
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.
18+
19+
```yaml
20+
version: "3"
21+
services:
22+
23+
lb:
24+
image: plone/plone-haproxy
25+
depends_on:
26+
- backend
27+
ports:
28+
- "8080:8080"
29+
- "1936:1936"
30+
environment:
31+
FRONTEND_PORT: "8080"
32+
BACKENDS: "backend"
33+
BACKENDS_PORT: "8080"
34+
DNS_ENABLED: "True"
35+
HTTPCHK: "GET /"
36+
INTER: "5s"
37+
LOG_LEVEL: "info"
38+
39+
backend:
40+
image: plone/plone-backend:6.0.0a4
41+
restart: always
42+
environment:
43+
ZEO_ADDRESS: zeo:8100
44+
ports:
45+
- "8080"
46+
depends_on:
47+
- zeo
48+
49+
zeo:
50+
image: plone/plone-zeo:latest
51+
restart: always
52+
volumes:
53+
- data:/data
54+
ports:
55+
- "8100"
56+
57+
volumes:
58+
data: {}
59+
```
60+
61+
## Build the project with multiple backends
62+
63+
Run `docker-compose up -d --scale backend=4` from your project directory.
64+
65+
## Access Plone via Browser
66+
67+
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.
68+
69+
## Access HAProxy Stats Page via Browser
70+
71+
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.
72+
73+
## Shutdown and cleanup
74+
75+
The command `docker-compose down` removes the containers and default network, but preserves the Plone database.
76+
77+
The command `docker-compose down --volumes` removes the containers, default network, and the Plone database.

docs/install/containers/examples/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ nginx-volto-plone
1616
nginx-volto-plone-zeo
1717
nginx-volto-plone-postgresql
1818
nginx-plone
19+
haproxy-plone-zeo
1920
```
2021

2122
Examples of projects running Plone using `docker-compose`.
@@ -26,3 +27,4 @@ Examples of projects running Plone using `docker-compose`.
2627
| [nginx-volto-plone-zeo](nginx-volto-plone-zeo) | Stack with nginx, Frontend, Backend and ZEO server |
2728
| [nginx-volto-plone-postgresql](nginx-volto-plone-postgresql) | Stack with nginx, Frontend, Backend and PostgreSQL DB |
2829
| [nginx-plone](nginx-plone) | Stack with nginx, and Backend (Plone Classic) |
30+
| [haproxy-plone-zeo](haproxy-plone-zeo) | Stack with haproxy, Backend and ZEO server |

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ html_meta:
1010

1111
Simple setup with one backend and data being persisted in a Docker volume.
1212

13+
Nginx in this example is used as a [reverse proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/").
14+
1315

1416
## Setup
1517

@@ -50,6 +52,10 @@ server {
5052
}
5153
```
5254

55+
```{note}
56+
`http://plone.localhost/` is the url you will be using to access the website.
57+
You can either use `localhost`, or add it in your `etc/hosts` file or DNS to point to the docker host IP.
58+
```
5359

5460
### Service configuration with `docker-compose`
5561

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ html_meta:
1010

1111
Very simple setup with only one or more backend instances accessing a Postgres server and data being persisted in a Docker volume.
1212

13+
Nginx in this example is used as a [reverse proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/").
14+
1315

1416
## Setup
1517

@@ -75,6 +77,10 @@ server {
7577
}
7678
```
7779

80+
```{note}
81+
`http://plone.localhost/` is the url you will be using to access the website.
82+
You can either use `localhost`, or add it in your `etc/hosts` file or DNS to point to the docker host IP.
83+
```
7884

7985
### Service configuration with `docker-compose`
8086

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ html_meta:
1010

1111
Very simple setup with only one or more backend instances accessing a ZEO server and data being persisted in a Docker volume.
1212

13+
Nginx in this example is used as a [reverse proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/").
1314

1415
## Setup
1516

@@ -75,6 +76,10 @@ server {
7576
}
7677
```
7778

79+
```{note}
80+
`http://plone.localhost/` is the url you will be using to access the website.
81+
You can either use `localhost`, or add it in your `etc/hosts` file or DNS to point to the docker host IP.
82+
```
7883

7984
### Service configuration with `docker-compose`
8085

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ html_meta:
1010

1111
Very simple setup with only one backend and data being persisted in a Docker volume.
1212

13+
Nginx in this example is used as a [reverse proxy](https://docs.nginx.com/nginx/admin-guide/web-server/reverse-proxy/").
1314

1415
## Setup
1516

@@ -75,6 +76,10 @@ server {
7576
}
7677
```
7778

79+
```{note}
80+
`http://plone.localhost/` is the url you will be using to access the website.
81+
You can either use `localhost`, or add it in your `etc/hosts` file or DNS to point to the docker host IP.
82+
```
7883

7984
### Service configuration with `docker-compose`
8085

0 commit comments

Comments
 (0)