Skip to content

Roundcube | Webmail client

git link

Simple

  • docker-compose.yml
YAML
services:
  roundcube:
    image: roundcube/roundcubemail:1.6.7-apache
    environment:
      ROUNDCUBEMAIL_DEFAULT_HOST: tls://mail.urdomain.com
      ROUNDCUBEMAIL_SMTP_SERVER: tls://mail.urdomain.com
      ROUNDCUBEMAIL_DB_TYPE: sqlite
      ROUNDCUBEMAIL_SKIN: elastic
    restart: unless-stopped
    ports:
      - 8000:80
    volumes:
      - ./www:/var/www/html
      - ./db/sqlite:/var/roundcube/db

Mysql

  • docker-compose.yml
YAML
services:
  roundcubedb:
    image: mysql:8
    container_name: roundcubedb
#    restart: unless-stopped
    volumes:
      - ./db/mysql:/var/lib/mysql
    ports:
      - 34010:5432
      - 33006:3306
    environment:
      - MYSQL_ROOT_PASSWORD=rootPass
      - MYSQL_DATABASE=roundcubemail

  roundcubemail:
    image: roundcube/roundcubemail:latest
    container_name: roundcubemail
#    restart: unless-stopped
    depends_on:
      - roundcubedb
    links:
      - roundcubedb
    volumes:
      - ./www:/var/www/html
    ports:
      - 9001:80
    environment:
      - ROUNDCUBEMAIL_DB_TYPE=mysql
      - ROUNDCUBEMAIL_DB_HOST=roundcubedb
      - ROUNDCUBEMAIL_DB_PASSWORD=rootPass
      - ROUNDCUBEMAIL_SKIN=elastic
      - ROUNDCUBEMAIL_DEFAULT_HOST=tls://mail.example.org
      - ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.org

Postgres

  • docker-compose.yml
YAML
services:
  roundcubemail:
    image: roundcube/roundcubemail:latest-fpm-alpine
    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:alpine
    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:alpine
    container_name: roundcubenginx
    # restart: unless-stopped
    ports:
      - 9008: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