Skip to content

Commit ca33921

Browse files
committed
Update postgres examples to be 18+ compatible
When starting the postgres examples, users are met with an error from the postgres container stating that the volume should be changed. See docker-library/postgres#1259 for details Signed-off-by: Jonas Kalderstam <jonas@cowboyprogrammer.org>
1 parent a74a9f4 commit ca33921

3 files changed

Lines changed: 99 additions & 97 deletions

File tree

examples/docker-compose-fpm-alpine.yaml

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
1-
version: '2'
1+
version: "2"
22

33
services:
4-
roundcubemail:
5-
image: roundcube/roundcubemail:latest-fpm-alpine
6-
container_name: roundcubemail
7-
# restart: unless-stopped
8-
depends_on:
9-
- roundcubedb
10-
links:
11-
- roundcubedb
12-
volumes:
13-
- ./www:/var/www/html
14-
environment:
15-
- ROUNDCUBEMAIL_DB_TYPE=pgsql
16-
- ROUNDCUBEMAIL_DB_HOST=roundcubedb # same as pgsql container name
17-
- ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name
18-
- ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
19-
- ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
20-
- ROUNDCUBEMAIL_SKIN=elastic
21-
- ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.example.org
22-
- ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.org
4+
roundcubemail:
5+
image: roundcube/roundcubemail:latest-fpm-alpine
6+
container_name: roundcubemail
7+
# restart: unless-stopped
8+
depends_on:
9+
- roundcubedb
10+
links:
11+
- roundcubedb
12+
volumes:
13+
- ./www:/var/www/html
14+
environment:
15+
- ROUNDCUBEMAIL_DB_TYPE=pgsql
16+
- ROUNDCUBEMAIL_DB_HOST=roundcubedb # same as pgsql container name
17+
- ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name
18+
- ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
19+
- ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
20+
- ROUNDCUBEMAIL_SKIN=elastic
21+
- ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.example.org
22+
- ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.org
2323

24-
roundcubedb:
25-
image: postgres:alpine
26-
container_name: roundcubedb
27-
# restart: unless-stopped
28-
volumes:
29-
- ./db/postgres:/var/lib/postgresql/data
30-
environment:
31-
- POSTGRES_DB=roundcube
32-
- POSTGRES_USER=roundcube
33-
- POSTGRES_PASSWORD=roundcube
24+
roundcubedb:
25+
image: postgres:alpine
26+
container_name: roundcubedb
27+
# restart: unless-stopped
28+
volumes:
29+
- ./db/postgres:/var/lib/postgresql
30+
environment:
31+
- POSTGRES_DB=roundcube
32+
- POSTGRES_USER=roundcube
33+
- POSTGRES_PASSWORD=roundcube
34+
35+
roundcubenginx:
36+
image: nginx:alpine
37+
container_name: roundcubenginx
38+
# restart: unless-stopped
39+
ports:
40+
- 9008:80
41+
depends_on:
42+
- roundcubemail
43+
links:
44+
- roundcubemail
45+
volumes:
46+
- ./www:/var/www/html
47+
- ./nginx/templates:/etc/nginx/templates
48+
# Provide a custom nginx conf
49+
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
50+
environment:
51+
- NGINX_HOST=localhost # set your local domain or your live domain
52+
- NGINX_PHP_CGI=roundcubemail:9000 # same as roundcubemail container name
3453

35-
roundcubenginx:
36-
image: nginx:alpine
37-
container_name: roundcubenginx
38-
# restart: unless-stopped
39-
ports:
40-
- 9008:80
41-
depends_on:
42-
- roundcubemail
43-
links:
44-
- roundcubemail
45-
volumes:
46-
- ./www:/var/www/html
47-
- ./nginx/templates:/etc/nginx/templates
48-
# Provide a custom nginx conf
49-
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
50-
environment:
51-
- NGINX_HOST=localhost # set your local domain or your live domain
52-
- NGINX_PHP_CGI=roundcubemail:9000 # same as roundcubemail container name
5354

5455
### Optional: add a full mail server stack to use with Roundcube like https://hub.docker.com/r/tvial/docker-mailserver
5556
# mailserver:

examples/docker-compose-fpm.yaml

Lines changed: 49 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,56 @@
1-
version: '2'
1+
version: "2"
22

33
services:
4-
roundcubemail:
5-
image: roundcube/roundcubemail:latest-fpm
6-
container_name: roundcubemail
7-
# restart: unless-stopped
8-
depends_on:
9-
- roundcubedb
10-
links:
11-
- roundcubedb
12-
volumes:
13-
- ./www:/var/www/html
14-
environment:
15-
- ROUNDCUBEMAIL_DB_TYPE=pgsql
16-
- ROUNDCUBEMAIL_DB_HOST=roundcubedb # same as pgsql container name
17-
- ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name
18-
- ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
19-
- ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
20-
- ROUNDCUBEMAIL_SKIN=elastic
21-
- ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.example.org
22-
- ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.org
4+
roundcubemail:
5+
image: roundcube/roundcubemail:latest-fpm
6+
container_name: roundcubemail
7+
# restart: unless-stopped
8+
depends_on:
9+
- roundcubedb
10+
links:
11+
- roundcubedb
12+
volumes:
13+
- ./www:/var/www/html
14+
environment:
15+
- ROUNDCUBEMAIL_DB_TYPE=pgsql
16+
- ROUNDCUBEMAIL_DB_HOST=roundcubedb # same as pgsql container name
17+
- ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name
18+
- ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
19+
- ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
20+
- ROUNDCUBEMAIL_SKIN=elastic
21+
- ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.example.org
22+
- ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.org
2323

24-
roundcubedb:
25-
image: postgres:latest
26-
container_name: roundcubedb
27-
# restart: unless-stopped
28-
volumes:
29-
- ./db/postgres:/var/lib/postgresql/data
30-
environment:
31-
- POSTGRES_DB=roundcube
32-
- POSTGRES_USER=roundcube
33-
- POSTGRES_PASSWORD=roundcube
24+
roundcubedb:
25+
image: postgres:latest
26+
container_name: roundcubedb
27+
# restart: unless-stopped
28+
volumes:
29+
- ./db/postgres:/var/lib/postgresql
30+
environment:
31+
- POSTGRES_DB=roundcube
32+
- POSTGRES_USER=roundcube
33+
- POSTGRES_PASSWORD=roundcube
34+
35+
roundcubenginx:
36+
image: nginx:latest
37+
container_name: roundcubenginx
38+
# restart: unless-stopped
39+
ports:
40+
- 9009:80
41+
depends_on:
42+
- roundcubemail
43+
links:
44+
- roundcubemail
45+
volumes:
46+
- ./www:/var/www/html
47+
- ./nginx/templates:/etc/nginx/templates
48+
# Provide a custom nginx conf
49+
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
50+
environment:
51+
- NGINX_HOST=localhost # set your local domain or your live domain
52+
- NGINX_PHP_CGI=roundcubemail:9000 # same as roundcubemail container name
3453

35-
roundcubenginx:
36-
image: nginx:latest
37-
container_name: roundcubenginx
38-
# restart: unless-stopped
39-
ports:
40-
- 9009:80
41-
depends_on:
42-
- roundcubemail
43-
links:
44-
- roundcubemail
45-
volumes:
46-
- ./www:/var/www/html
47-
- ./nginx/templates:/etc/nginx/templates
48-
# Provide a custom nginx conf
49-
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
50-
environment:
51-
- NGINX_HOST=localhost # set your local domain or your live domain
52-
- NGINX_PHP_CGI=roundcubemail:9000 # same as roundcubemail container name
5354

5455
### Optional: add a full mail server stack to use with Roundcube like https://hub.docker.com/r/tvial/docker-mailserver
5556
# mailserver:

examples/kubernetes.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ spec:
114114
ports:
115115
- containerPort: 5432
116116
volumeMounts:
117-
- mountPath: /var/lib/postgresql/data
117+
- mountPath: /var/lib/postgresql
118118
name: roundcubedb-volume
119119
restartPolicy: Always
120120
serviceAccountName: ""

0 commit comments

Comments
 (0)