Coder Social home page Coder Social logo

roundcubemail-docker's Introduction

Build Status Docker Pulls

Running Roundcube in a Docker Container

The simplest method is to run the official image:

docker run -e ROUNDCUBEMAIL_DEFAULT_HOST=mail -e ROUNDCUBEMAIL_SMTP_SERVER=mail -d roundcube/roundcubemail

where mail should be replaced by your host name for the IMAP and SMTP server.

Configuration/Environment Variables

The following env variables can be set to configure your Roundcube Docker instance:

ROUNDCUBEMAIL_DEFAULT_HOST - Hostname of the IMAP server to connect to, use tls:// prefix for STARTTLS

ROUNDCUBEMAIL_DEFAULT_PORT - IMAP port number; defaults to 143

ROUNDCUBEMAIL_SMTP_SERVER - Hostname of the SMTP server to send mails, use tls:// prefix for STARTTLS

ROUNDCUBEMAIL_SMTP_PORT - SMTP port number; defaults to 587

ROUNDCUBEMAIL_PLUGINS - List of built-in plugins to activate. Defaults to archive,zipdownload

ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE - File upload size limit; defaults to 5M

By default, the image will use a local SQLite database for storing user account metadata. It'll be created inside the /var/www/html directory and can be backed up from there. Please note that this option should not be used for production environments.

Connect to a MySQL Database

The recommended way to run Roundcube is connected to a MySQL database. Specify the following env variables to do so:

ROUNDCUBEMAIL_DB_TYPE - Database provider; currently supported: mysql, pgsql, sqlite

ROUNDCUBEMAIL_DB_HOST - Host (or Docker instance) name of the database service; defaults to mysql or postgres depending on linked containers.

ROUNDCUBEMAIL_DB_USER - The database username for Roundcube; defaults to root on mysql

ROUNDCUBEMAIL_DB_PASSWORD - The password for the database connection

ROUNDCUBEMAIL_DB_NAME - The database name for Roundcube to use; defaults to roundcubemail

Before starting the container, please make sure that the supplied database exists and the given database user has privileges to create tables.

Run it with a link to the MySQL host and the username/password variables:

docker run --link=mysql:mysql -d roundcube/roundcubemail

Advanced configuration

Apart from the above described environment variables, the Docker image also allows to add custom config files which are merged into Roundcube's default config. Therefore the image defines a volume /var/roundcube/config where additional config files (*.php) are searched and included. Mount a local directory with your config files - check for valid PHP syntax - when starting the Docker container:

docker run -v ./config/:/var/roundcube/config/ -d roundcube/roundcubemail

Check the Roundcube Webmail wiki for a reference of Roundcube config options.

Customized PHP settings can be implemented by mounting a configuration file to /usr/local/etc/php/conf.d/zzz_roundcube-custom.ini. For example, it may be used to increase the PHP memory limit (memory_limit=128M).

Building a Docker image

Use the Dockerfile in this repository to build your own Docker image. It pulls the latest build of Roundcube Webmail from the Github download page and builds it on top of a php:7.1-apache Docker image.

Build it from this directory with

docker build -t roundcubemail .

roundcubemail-docker's People

Contributors

aspettl avatar j0wi avatar madmath03 avatar rodolfovillaruz avatar thomascube avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.