feat(): add memory limit variable #17

This commit is contained in:
Hardware 2018-06-25 20:34:30 +02:00
parent fc8124dc77
commit ab4c7c0939
No known key found for this signature in database
GPG Key ID: EC6DF6F90263EDEA
4 changed files with 4 additions and 1 deletions

View File

@ -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" 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 \ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/apk/repositories \
&& apk -U upgrade \ && apk -U upgrade \

View File

@ -31,6 +31,7 @@ Rainloop is a simple, modern & fast web-based client. More details on the [offic
| **GID** | rainloop group id | *optional* | 991 | **GID** | rainloop group id | *optional* | 991
| **UPLOAD_MAX_SIZE** | Attachment size limit | *optional* | 25M | **UPLOAD_MAX_SIZE** | Attachment size limit | *optional* | 25M
| **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false | **LOG_TO_STDOUT** | Enable nginx and php error logs to stdout | *optional* | false
| **MEMORY_LIMIT** | PHP memory limit | *optional* | 128M
### Docker-compose.yml ### Docker-compose.yml

View File

@ -12,3 +12,4 @@ chdir = /
php_admin_value[expose_php] = Off php_admin_value[expose_php] = Off
php_admin_value[post_max_size] = <UPLOAD_MAX_SIZE> php_admin_value[post_max_size] = <UPLOAD_MAX_SIZE>
php_admin_value[upload_max_filesize] = <UPLOAD_MAX_SIZE> php_admin_value[upload_max_filesize] = <UPLOAD_MAX_SIZE>
php_admin_value[memory_limit] = <MEMORY_LIMIT>

View File

@ -2,6 +2,7 @@
# Set attachment size limit # Set attachment size limit
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/php7/php-fpm.conf /etc/nginx/nginx.conf sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/php7/php-fpm.conf /etc/nginx/nginx.conf
sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /etc/php7/php-fpm.conf
# Remove postfixadmin-change-password plugin if exist # Remove postfixadmin-change-password plugin if exist
if [ -d "/rainloop/data/_data_/_default_/plugins/postfixadmin-change-password" ]; then if [ -d "/rainloop/data/_data_/_default_/plugins/postfixadmin-change-password" ]; then