From 74e4426c3117f85d8f4c1c085b3743b62c22075e Mon Sep 17 00:00:00 2001 From: Adrien le Maire Date: Sat, 12 Sep 2020 10:46:11 +0200 Subject: [PATCH] fix freshrss --- freshrss/Dockerfile | 12 +++++------- freshrss/entrypoint.sh | 5 ++++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/freshrss/Dockerfile b/freshrss/Dockerfile index 17a1720..72457a7 100644 --- a/freshrss/Dockerfile +++ b/freshrss/Dockerfile @@ -10,7 +10,7 @@ RUN apt-get update -qq && \ ca-certificates cron \ apache2 libapache2-mod-php \ php-curl php-gmp php-intl php-mbstring php-xml php-zip \ - php-sqlite3 php-mysql php-pgsql && \ + php-sqlite3 php-mysql php-pgsql wget && \ rm -rf /var/lib/apt/lists/* RUN mkdir -p /var/www/ /run/apache2/ @@ -22,7 +22,7 @@ RUN wget $SRC && tar -xf ${VERSION}.tar.gz && rm {VERSION}.tar.gz && \ mv /var/www/FreshRSS/Docker/FreshRSS.Apache.conf /etc/apache2/sites-available/ && \ sed -i "s/\:80/\:8080/" /etc/apache2/sites-available/FreshRSS.Apache.conf && \ sed -i "s/OS/Prod/" /etc/apache2/sites-available/FreshRSS.Apache.conf && \ -ADD entrypoint.sh /var/www/FreshRSS/Docker/entrypoint.sh +ADD entrypoint.sh /usr/local/bin/entrypoint.sh RUN a2dismod -f alias autoindex negotiation status && \ a2enmod deflate expires headers mime setenvif && \ @@ -32,10 +32,8 @@ RUN a2dismod -f alias autoindex negotiation status && \ RUN sed -r -i "/^\s*(CustomLog|ErrorLog|Listen) /s/^/#/" /etc/apache2/apache2.conf && \ sed -r -i "/^\s*Listen /s/^/#/" /etc/apache2/ports.conf && \ - touch /var/www/FreshRSS/Docker/env.txt && \ - echo "7,37 * * * * . /var/www/FreshRSS/Docker/env.txt; \ - su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \ - 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | crontab - + touch /var/www/FreshRSS/Docker/env.txt + WORKDIR /var/www/FreshRSS RUN chown -R :www-data . && \ chmod -R g+r . && chmod -R g+w ./data/ && \ @@ -50,7 +48,7 @@ ENV FRESHRSS_ENV '' # UID of www-data USER 33 -ENTRYPOINT ["./Docker/entrypoint.sh"] +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] EXPOSE 8080 CMD ([ -z "$CRON_MIN" ] || cron) && \ diff --git a/freshrss/entrypoint.sh b/freshrss/entrypoint.sh index 0d2e7a7..594487d 100644 --- a/freshrss/entrypoint.sh +++ b/freshrss/entrypoint.sh @@ -9,7 +9,10 @@ if [ -n "$CRON_MIN" ]; then echo "export COPY_SYSLOG_TO_STDERR=$COPY_SYSLOG_TO_STDERR" echo "export FRESHRSS_ENV=$FRESHRSS_ENV" ) >/var/www/FreshRSS/Docker/env.txt - crontab -l | sed -r "\\#FreshRSS#s#^[^ ]+ #$CRON_MIN #" | crontab - + echo "${CRON_MIN} * * * * . /var/www/FreshRSS/Docker/env.txt; \ + su www-data -s /bin/sh -c 'php /var/www/FreshRSS/app/actualize_script.php' \ + 2>> /proc/1/fd/2 > /tmp/FreshRSS.log" | crontab - + fi exec "$@"