[docker-rainloop] Switch to SnappyMail



commit 862aef2ec57c8b6dcc44bcadbf25a39cc29bfe56
Author: Bartłomiej Piotrowski <bpiotrowski gnome org>
Date:   Tue Feb 1 21:41:45 2022 +0100

    Switch to SnappyMail

 Dockerfile    | 17 ++++++++++-------
 entrypoint.sh |  4 ++--
 2 files changed, 12 insertions(+), 9 deletions(-)
---
diff --git a/Dockerfile b/Dockerfile
index 9150d3f..94aa828 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,19 +4,22 @@ RUN apt-get update && apt-get install -y libpq-dev && \
     docker-php-ext-configure pgsql && \
     docker-php-ext-install pdo pdo_pgsql pgsql
 
-RUN sed -ri -e "s!/var/www/html!/rainloop!g" /etc/apache2/sites-available/*.conf && \
-    sed -ri -e "s!/var/www/!/rainloop!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf && \
+SHELL ["/bin/bash", "-c"]
+
+RUN sed -ri -e "s!/var/www/html!/snappymail!g" /etc/apache2/sites-available/*.conf && \
+    sed -ri -e "s!/var/www/!/snappymail!g" /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf && \
     sed -ri -e 's/:80/:8000/g' /etc/apache2/sites-available/000-default.conf && \
     sed -ri -e 's/80/8000/g' /etc/apache2/ports.conf && \
     sed -ri -e 's/DEFAULT@SECLEVEL=2/DEFAULT@SECLEVEL=1/' /etc/ssl/openssl.cnf
 
 RUN apt-get update && \
     apt-get install -y unzip wget && \
-    wget https://www.rainloop.net/repository/webmail/rainloop-community-latest.zip && \
-    mkdir /rainloop && \
-    unzip rainloop-community-latest.zip -d /rainloop && \
-    rm -f rainloop-community-latest.zip
+    export SNAPPYMAIL_VER=$(curl --silent https://api.github.com/repos/the-djmaze/SnappyMail/releases/latest 
| grep '"tag_name"' | sed -E 's/.*"([^"]+)".*/\1/') && \
+    wget 
https://github.com/the-djmaze/snappymail/releases/download/$SNAPPYMAIL_VER/snappymail-${SNAPPYMAIL_VER:1}.zip 
&& \
+    mkdir /snappymail && \
+    unzip snappymail-*.zip -d /snappymail && \
+    rm -f snappymail-*.zip
 
-WORKDIR /rainloop
+WORKDIR /snappymail
 COPY entrypoint.sh /entrypoint.sh
 ENTRYPOINT ["/entrypoint.sh"]
diff --git a/entrypoint.sh b/entrypoint.sh
index 26d1e91..1cc5569 100755
--- a/entrypoint.sh
+++ b/entrypoint.sh
@@ -1,5 +1,5 @@
 #!/bin/bash
 
-chown -R www-data:www-data /rainloop/data || true
-echo "Require all denied" > /rainloop/data/.htaccess
+chown -R www-data:www-data /snappymail/data || true
+echo "Require all denied" > /snappymail/data/.htaccess
 /usr/local/bin/apache2-foreground


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]