Add env variable to adjust upload_max_filesize (#6083)

pull/6120/merge
Thomas Bruederli 7 years ago
parent 12a2e47b9b
commit 430237171b

@ -20,6 +20,8 @@ The following env variables can be set to configure your Roundcube Docker instan
`ROUNDCUBEMAIL_PLUGINS` - List of built-in plugins to activate. Defaults to `archive,zipdownload` `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. By default, the image will use a local SQLite database for storing user account metadata.
It'll be created inside the `/var/www/html` volume and can be backed up from there. Please note that It'll be created inside the `/var/www/html` volume and can be backed up from there. Please note that
this option should not be used for production environments. this option should not be used for production environments.

@ -85,6 +85,10 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
echo "WARNING: $PWD/config/config.inc.php already exists." echo "WARNING: $PWD/config/config.inc.php already exists."
echo "ROUNDCUBEMAIL_* environment variables have been ignored." echo "ROUNDCUBEMAIL_* environment variables have been ignored."
fi fi
if [ ! -z "${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" ]; then
sed -i -E "s/(upload_max_filesize|post_max_size) +[0-9BKMG]+/\1 ${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}/g" $PWD/.htaccess
fi
fi fi
exec "$@" exec "$@"

Loading…
Cancel
Save