Compare commits

...

3 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
3 changed files with 15 additions and 14 deletions

View File

@ -1,10 +1,9 @@
FROM alpine:latest FROM alpine:latest
LABEL description "Rainloop is a simple, modern & fast web-based client" \ LABEL description "Snappymail is a simple, modern & fast web-based client based on Rainloop"
maintainer="Hardware <contact@meshup.net>"
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=1.17.0 ARG RAINLOOP_VERSION=2.29.3
ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M LOG_TO_STDOUT=false MEMORY_LIMIT=128M ENV UID=991 GID=991 UPLOAD_MAX_SIZE=25M LOG_TO_STDOUT=false MEMORY_LIMIT=128M
@ -31,18 +30,20 @@ RUN apk -U upgrade \
php-pdo_sqlite \ php-pdo_sqlite \
php-sqlite3 \ php-sqlite3 \
php-ldap \ php-ldap \
php-mbstring \
php-ctype \
php-simplexml php-simplexml
WORKDIR /tmp WORKDIR /tmp
RUN set -ex ; \ RUN set -ex ; \
wget -q https://github.com/RainLoop/rainloop-webmail/releases/download/v1.17.0/rainloop-legacy-${RAINLOOP_VERSION}.zip ; \ wget -q https://github.com/the-djmaze/snappymail/releases/download/v${RAINLOOP_VERSION}/snappymail-${RAINLOOP_VERSION}.zip ; \
wget -q https://github.com/RainLoop/rainloop-webmail/releases/download/v1.17.0/rainloop-legacy-${RAINLOOP_VERSION}.zip.asc ; \ wget -q https://github.com/the-djmaze/snappymail/releases/download/v${RAINLOOP_VERSION}/snappymail-${RAINLOOP_VERSION}.zip.asc ; \
wget -q https://www.rainloop.net/repository/RainLoop.asc ; \ wget -q https://snappymail.eu/repository/deb/48208BA13290F3EB.asc ; \
gpg --import RainLoop.asc ; \ gpg --import 48208BA13290F3EB.asc ; \
FINGERPRINT="$(LANG=C gpg --verify rainloop-legacy-${RAINLOOP_VERSION}.zip.asc rainloop-legacy-${RAINLOOP_VERSION}.zip 2>&1 | sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" ; \ 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 [ -z "${FINGERPRINT}" ]; then echo "ERROR: Invalid GPG signature!" && exit 1; fi ; \
if [ "${FINGERPRINT}" != "${GPG_FINGERPRINT}" ]; then echo "ERROR: Wrong GPG fingerprint!" && exit 1; fi ; \ if [ "${FINGERPRINT}" != "${GPG_FINGERPRINT}" ]; then echo "ERROR: Wrong GPG fingerprint!" && exit 1; fi ; \
mkdir /rainloop; \ mkdir /rainloop; \
unzip -q /tmp/rainloop-legacy-${RAINLOOP_VERSION}.zip -d /rainloop ; \ unzip -q /tmp/snappymail-${RAINLOOP_VERSION}.zip -d /rainloop ; \
find /rainloop -type d -exec chmod 755 {} \; ; \ find /rainloop -type d -exec chmod 755 {} \; ; \
find /rainloop -type f -exec chmod 644 {} \; ; \ find /rainloop -type f -exec chmod 644 {} \; ; \
apk del build-dependencies ; \ apk del build-dependencies ; \

View File

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

View File

@ -1,8 +1,8 @@
#!/bin/sh #!/bin/sh
# Set attachment size limit # Set attachment size limit
sed -i "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /etc/php8/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/php8/php-fpm.conf sed -i "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /etc/php81/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
@ -14,7 +14,7 @@ if [ "$LOG_TO_STDOUT" = true ]; then
echo "[INFO] Logging to stdout activated" echo "[INFO] Logging to stdout activated"
chmod o+w /dev/stdout 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 warn;/" /etc/nginx/nginx.conf
sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php8/php-fpm.conf sed -i "s/.*error_log.*$/error_log = \/dev\/stdout/" /etc/php81/php-fpm.conf
fi fi
# Add postfixadmin-change-password plugin # Add postfixadmin-change-password plugin