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" \ 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=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 \ RUN apk -U upgrade \
&& apk -U upgrade \
&& apk add -t build-dependencies \ && apk add -t build-dependencies \
gnupg \ gnupg \
openssl \ openssl \
@@ -18,34 +17,37 @@ RUN echo "@community https://nl.alpinelinux.org/alpine/v3.7/community" >> /etc/a
nginx \ nginx \
s6 \ s6 \
su-exec \ su-exec \
php7-fpm@community \ php-fpm \
php7-curl@community \ php-curl \
php7-iconv@community \ php-iconv \
php7-xml@community \ php-xml \
php7-dom@community \ php-dom \
php7-openssl@community \ php-openssl \
php7-json@community \ php-json \
php7-zlib@community \ php-zlib \
php7-pdo_pgsql@community \ php-pdo_pgsql \
php7-pdo_mysql@community \ php-pdo_mysql \
php7-pdo_sqlite@community \ php-pdo_sqlite \
php7-sqlite3@community \ php-sqlite3 \
php7-ldap@community \ php-ldap \
php7-simplexml@community \ php-mbstring \
&& cd /tmp \ php-ctype \
&& wget -q https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip \ php-simplexml
&& wget -q https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip.asc \ WORKDIR /tmp
&& wget -q https://www.rainloop.net/repository/RainLoop.asc \ RUN set -ex ; \
&& gpg --import RainLoop.asc \ wget -q https://github.com/the-djmaze/snappymail/releases/download/v${RAINLOOP_VERSION}/snappymail-${RAINLOOP_VERSION}.zip ; \
&& FINGERPRINT="$(LANG=C gpg --verify rainloop-community-latest.zip.asc rainloop-community-latest.zip 2>&1 \ wget -q https://github.com/the-djmaze/snappymail/releases/download/v${RAINLOOP_VERSION}/snappymail-${RAINLOOP_VERSION}.zip.asc ; \
| sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" \ wget -q https://snappymail.eu/repository/deb/48208BA13290F3EB.asc ; \
&& if [ -z "${FINGERPRINT}" ]; then echo "ERROR: Invalid GPG signature!" && exit 1; fi \ gpg --import 48208BA13290F3EB.asc ; \
&& if [ "${FINGERPRINT}" != "${GPG_FINGERPRINT}" ]; then echo "ERROR: Wrong GPG fingerprint!" && exit 1; fi \ FINGERPRINT="$(LANG=C gpg --verify snappymail-${RAINLOOP_VERSION}.zip.asc snappymail-${RAINLOOP_VERSION}.zip 2>&1 | sed -n "s#Primary key fingerprint: \(.*\)#\1#p")" ; \
&& mkdir /rainloop && unzip -q /tmp/rainloop-community-latest.zip -d /rainloop \ if [ -z "${FINGERPRINT}" ]; then echo "ERROR: Invalid GPG signature!" && exit 1; fi ; \
&& find /rainloop -type d -exec chmod 755 {} \; \ if [ "${FINGERPRINT}" != "${GPG_FINGERPRINT}" ]; then echo "ERROR: Wrong GPG fingerprint!" && exit 1; fi ; \
&& find /rainloop -type f -exec chmod 644 {} \; \ mkdir /rainloop; \
&& apk del build-dependencies \ unzip -q /tmp/snappymail-${RAINLOOP_VERSION}.zip -d /rainloop ; \
&& rm -rf /tmp/* /var/cache/apk/* /root/.gnupg 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 / COPY rootfs /
RUN chmod +x /usr/local/bin/run.sh /services/*/run /services/.s6-svscan/* 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 | **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

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

View File

@@ -1,7 +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/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 # 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
@@ -13,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/php7/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