From ab4c7c093917882ab8b4ba6da6b44f4b0aac254f Mon Sep 17 00:00:00 2001 From: Hardware Date: Mon, 25 Jun 2018 20:34:30 +0200 Subject: [PATCH] feat(): add memory limit variable #17 --- Dockerfile | 2 +- README.md | 1 + rootfs/etc/php7/php-fpm.conf | 1 + rootfs/usr/local/bin/run.sh | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1e7379b..2072839 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ LABEL description "Rainloop is a simple, modern & fast web-based client" \ ARG GPG_FINGERPRINT="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591" -ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M LOG_TO_STDOUT=false +ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M LOG_TO_STDOUT=false MEMORY_LIMIT=128M RUN echo "@community https://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/apk/repositories \ && apk -U upgrade \ diff --git a/README.md b/README.md index 2d8328f..2ca6d30 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,7 @@ Rainloop is a simple, modern & fast web-based client. More details on the [offic | **GID** | rainloop group id | *optional* | 991 | **UPLOAD_MAX_SIZE** | Attachment size limit | *optional* | 25M | **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false +| **MEMORY_LIMIT** | PHP memory limit | *optional* | 128M ### Docker-compose.yml diff --git a/rootfs/etc/php7/php-fpm.conf b/rootfs/etc/php7/php-fpm.conf index db22e2b..e76de49 100644 --- a/rootfs/etc/php7/php-fpm.conf +++ b/rootfs/etc/php7/php-fpm.conf @@ -12,3 +12,4 @@ chdir = / php_admin_value[expose_php] = Off php_admin_value[post_max_size] = php_admin_value[upload_max_filesize] = +php_admin_value[memory_limit] = diff --git a/rootfs/usr/local/bin/run.sh b/rootfs/usr/local/bin/run.sh index 37c7138..7cc4d0b 100644 --- a/rootfs/usr/local/bin/run.sh +++ b/rootfs/usr/local/bin/run.sh @@ -2,6 +2,7 @@ # Set attachment size limit sed -i "s//$UPLOAD_MAX_SIZE/g" /etc/php7/php-fpm.conf /etc/nginx/nginx.conf +sed -i "s//$MEMORY_LIMIT/g" /etc/php7/php-fpm.conf # Remove postfixadmin-change-password plugin if exist if [ -d "/rainloop/data/_data_/_default_/plugins/postfixadmin-change-password" ]; then