Compare commits

...

10 Commits

Author SHA1 Message Date
cb0775ac8b upgrade to 2.29.3 2023-11-21 15:53:38 +00:00
3cebae57b8 switch to snappymail 2023-10-19 08:47:55 +01:00
adf695639b update for php81 2023-10-18 15:22:10 +01:00
0d571cad4a update for Alpine 3.17 2023-02-04 18:11:31 +00:00
2d593b9079 alpine has moved php8 to php 2023-02-04 17:32:12 +00:00
f45b22b422 update to alpine:latest, php8 and rainloop 1.17 2022-11-08 15:07:16 +00:00
Hardware
ff22a66752 update(): alpine 3.10 2019-08-15 10:18:18 +02:00
Hardware
30e993093b merge(): branch 'michael-k-patch-1' into master 2018-07-07 08:35:57 +02:00
Michael
9c5f93dd0f chore(): update to alpine 3.8 2018-07-06 15:00:58 +00:00
Hardware
ab4c7c0939 feat(): add memory limit variable #17 2018-06-25 20:34:30 +02:00
5 changed files with 43 additions and 38 deletions

View File

@@ -1,14 +1,13 @@
FROM alpine:3.7
FROM alpine:latest
LABEL description "Rainloop is a simple, modern & fast web-based client" \
maintainer="Hardware <contact@meshup.net>"
LABEL description "Snappymail is a simple, modern & fast web-based client based on Rainloop"
ARG GPG_FINGERPRINT="3B79 7ECE 694F 3B7B 70F3 11A4 ED7C 49D9 87DA 4591"
ARG GPG_FINGERPRINT="1016 E470 7914 5542 F8BA 1335 4820 8BA1 3290 F3EB"
ARG RAINLOOP_VERSION=2.29.3
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 \
RUN apk -U upgrade \
&& apk add -t build-dependencies \
gnupg \
openssl \
@@ -18,34 +17,37 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/a
nginx \
s6 \
su-exec \
php7-fpm@community \
php7-curl@community \
php7-iconv@community \
php7-xml@community \
php7-dom@community \
php7-openssl@community \
php7-json@community \
php7-zlib@community \
php7-pdo_pgsql@community \
php7-pdo_mysql@community \
php7-pdo_sqlite@community \
php7-sqlite3@community \
php7-ldap@community \
php7-simplexml@community \
&& cd /tmp \
&& wget -q https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip \
&& wget -q https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip.asc \
&& wget -q https://www.rainloop.net/repository/RainLoop.asc \
&& gpg --import RainLoop.asc \
&& FINGERPRINT="$(LANG=C gpg --verify rainloop-community-latest.zip.asc rainloop-community-latest.zip 2>&1 \
| sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \
&& if [ -z "${FINGERPRINT}" ]; then echo "ERROR: Invalid GPG signature!" && exit 1; fi \
&& if [ "${FINGERPRINT}" != "${GPG_FINGERPRINT}" ]; then echo "ERROR: Wrong GPG fingerprint!" && exit 1; fi \
&& mkdir /rainloop && unzip -q /tmp/rainloop-community-latest.zip -d /rainloop \
&& find /rainloop -type d -exec chmod 755 {} \; \
&& find /rainloop -type f -exec chmod 644 {} \; \
&& apk del build-dependencies \
&& rm -rf /tmp/* /var/cache/apk/* /root/.gnupg
php-fpm \
php-curl \
php-iconv \
php-xml \
php-dom \
php-openssl \
php-json \
php-zlib \
php-pdo_pgsql \
php-pdo_mysql \
php-pdo_sqlite \
php-sqlite3 \
php-ldap \
php-mbstring \
php-ctype \
php-simplexml
WORKDIR /tmp
RUN set -ex ; \
wget -q https://github.com/the-djmaze/snappymail/releases/download/v${RAINLOOP_VERSION}/snappymail-${RAINLOOP_VERSION}.zip ; \
wget -q https://github.com/the-djmaze/snappymail/releases/download/v${RAINLOOP_VERSION}/snappymail-${RAINLOOP_VERSION}.zip.asc ; \
wget -q https://snappymail.eu/repository/deb/48208BA13290F3EB.asc ; \
gpg --import 48208BA13290F3EB.asc ; \
FINGERPRINT="$(LANG=C gpg --verify snappymail-${RAINLOOP_VERSION}.zip.asc snappymail-${RAINLOOP_VERSION}.zip 2>&1 | sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" ; \
if [ -z "${FINGERPRINT}" ]; then echo "ERROR: Invalid GPG signature!" && exit 1; fi ; \
if [ "${FINGERPRINT}" != "${GPG_FINGERPRINT}" ]; then echo "ERROR: Wrong GPG fingerprint!" && exit 1; fi ; \
mkdir /rainloop; \
unzip -q /tmp/snappymail-${RAINLOOP_VERSION}.zip -d /rainloop ; \
find /rainloop -type d -exec chmod 755 {} \; ; \
find /rainloop -type f -exec chmod 644 {} \; ; \
apk del build-dependencies ; \
rm -rf /tmp/* /var/cache/apk/* /root/.gnupg
COPY rootfs /
RUN chmod +x /usr/local/bin/run.sh /services/*/run /services/.s6-svscan/*

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
| **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

View File

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

View File

@@ -1,2 +1,2 @@
#!/bin/sh
exec php-fpm7
exec php-fpm81

View File

@@ -1,7 +1,8 @@
#!/bin/sh
# 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/php81/php-fpm.conf /etc/nginx/nginx.conf
sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /etc/php81/php-fpm.conf
# Remove postfixadmin-change-password plugin if exist
if [ -d "/rainloop/data/_data_/_default_/plugins/postfixadmin-change-password" ]; then
@@ -13,7 +14,7 @@ if [ "$LOG_TO_STDOUT" = true ]; then
echo "[INFO] Logging to stdout activated"
chmod o+w /dev/stdout
sed -i "s/.*error_log.*$/error_log \/dev\/stdout warn;/" /etc/nginx/nginx.conf
sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php7/php-fpm.conf
sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php81/php-fpm.conf
fi
# Add postfixadmin-change-password plugin