Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Memory limit environment variable #73

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ The following env variables can be set to configure your Roundcube Docker instan

`ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE` - File upload size limit; defaults to `5M`

`ROUNDCUBEMAIL_MEMORY_LIMIT` - Memory limit; defaults to `64M`

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.
Expand Down
4 changes: 4 additions & 0 deletions apache/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
echo "upload_max_filesize=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
echo "post_max_size=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
fi

if [ ! -z "${ROUNDCUBEMAIL_MEMORY_LIMIT}" ]; then
echo "memory_limit=${ROUNDCUBEMAIL_MEMORY_LIMIT}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
fi
fi

exec "$@"
4 changes: 4 additions & 0 deletions fpm-alpine/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
echo "upload_max_filesize=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
echo "post_max_size=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
fi

if [ ! -z "${ROUNDCUBEMAIL_MEMORY_LIMIT}" ]; then
echo "memory_limit=${ROUNDCUBEMAIL_MEMORY_LIMIT}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
fi
fi

exec "$@"
4 changes: 4 additions & 0 deletions fpm/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
echo "upload_max_filesize=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
echo "post_max_size=${ROUNDCUBEMAIL_UPLOAD_MAX_FILESIZE}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
fi

if [ ! -z "${ROUNDCUBEMAIL_MEMORY_LIMIT}" ]; then
echo "memory_limit=${ROUNDCUBEMAIL_MEMORY_LIMIT}" >> /usr/local/etc/php/conf.d/roundcube-override.ini
fi
fi

exec "$@"