roundcubemail-docker/examples/docker-compose-fpm.yaml
Thomas Bruederli ef6dfbea21 Add example docker-compose files
... for all variants of Roundcube images.

relates to issue #99
2020-10-05 22:54:03 +02:00

68 lines
2.1 KiB
YAML

version: '2'
services:
roundcubemail:
image: roundcube/roundcubemail:latest-fpm
container_name: roundcubemail
# restart: unless-stopped
depends_on:
- roundcubedb
links:
- roundcubedb
ports:
- 9000:9000
volumes:
- ./www:/var/www/html
environment:
- ROUNDCUBEMAIL_DB_TYPE=pgsql
- ROUNDCUBEMAIL_DB_HOST=roundcubedb # same as pgsql container name
- ROUNDCUBEMAIL_DB_NAME=roundcube # same as pgsql POSTGRES_DB env name
- ROUNDCUBEMAIL_DB_USER=roundcube # same as pgsql POSTGRES_USER env name
- ROUNDCUBEMAIL_DB_PASSWORD=roundcube # same as pgsql POSTGRES_PASSWORD env name
- ROUNDCUBEMAIL_SKIN=elastic
- ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.example.org
- ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.org
roundcubedb:
image: postgres:latest
container_name: roundcubedb
# restart: unless-stopped
ports:
- 5432:5432
volumes:
- ./db/postgres:/var/lib/postgresql/data
environment:
- POSTGRES_DB=roundcube
- POSTGRES_USER=roundcube
- POSTGRES_PASSWORD=roundcube
roundcubenginx:
image: nginx:latest
container_name: roundcubenginx
# restart: unless-stopped
ports:
- 9009:80
# If you need SSL connection
# - '443:443'
depends_on:
- roundcubemail
links:
- roundcubemail
volumes:
- ./www:/var/www/html
- ./nginx/templates:/etc/nginx/templates
# Provide a custom nginx conf
# - ./nginx/nginx.conf:/etc/nginx/nginx.conf:ro
# If you need SSL connection, you can provide your own certificates
# - ./certs:/etc/letsencrypt
# - ./certs-data:/data/letsencrypt
environment:
- NGINX_HOST=localhost # set your local domain or your live domain
- NGINX_PHP_CGI=roundcubemail:9000 # same as roundcubemail container name
### Optional: add a full mail server stack to use with Roundcube like https://hub.docker.com/r/tvial/docker-mailserver
# mailserver:
# image: tvial/docker-mailserver:latest
# hostname: mail.example.org
# ... # for more options see https://github.com/tomav/docker-mailserver#examples