fix freshrss

This commit is contained in:
Adrien le Maire 2020-09-12 10:46:11 +02:00
parent 534c1575b9
commit 74e4426c31
2 changed files with 9 additions and 8 deletions

View File

@ -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) && \

View File

@ -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 "$@"