diff --git a/freshrss/Dockerfile b/freshrss/Dockerfile index a450535..d23b801 100644 --- a/freshrss/Dockerfile +++ b/freshrss/Dockerfile @@ -4,7 +4,8 @@ ARG FRESHRSS_VER=1.7.0 ENV UID=991 GID=991 \ UPLOAD_MAX_SIZE=10M \ - MEMORY_LIMIT=128M + MEMORY_LIMIT=128M \ + CRON_PERIOD=30m RUN apk -U add --no-cache \ tar \ diff --git a/freshrss/README.md b/freshrss/README.md index 93bf850..82bdf7f 100644 --- a/freshrss/README.md +++ b/freshrss/README.md @@ -5,6 +5,7 @@ A free, self-hostable aggregator : https://github.com/FreshRSS/FreshRSS #### Features - Based on Alpine Linux (wonderfall/nginx-php image) - Bundled with nginx and PHP7.1. +- Automatic feed update (frequency at 30 minutes by default) #### Build-time variables - **FRESHRSS_VER** : version of FreshRSS @@ -14,6 +15,7 @@ A free, self-hostable aggregator : https://github.com/FreshRSS/FreshRSS - **GID** : group id - **MEMORY_LIMIT** : php memory limit *(default : 128M)* - **UPLOAD_MAX_SIZE** : maximum upload size *(default : 10M)* +- **CRON_PERIOD** : feed update frequency *(default : 30m)* #### Volumes - **/freshrss/data** diff --git a/freshrss/rootfs/etc/s6.d/cron/run b/freshrss/rootfs/etc/s6.d/cron/run new file mode 100644 index 0000000..584e453 --- /dev/null +++ b/freshrss/rootfs/etc/s6.d/cron/run @@ -0,0 +1,6 @@ +#!/bin/sh + +while true; do + php -f /freshrss/app/actualize_script.php + sleep +done diff --git a/freshrss/rootfs/usr/local/bin/run.sh b/freshrss/rootfs/usr/local/bin/run.sh index c7c9954..e61bfaa 100644 --- a/freshrss/rootfs/usr/local/bin/run.sh +++ b/freshrss/rootfs/usr/local/bin/run.sh @@ -1,6 +1,7 @@ #!/bin/sh sed -i -e "s//$UPLOAD_MAX_SIZE/g" /nginx/conf/nginx.conf /php/etc/php-fpm.conf \ - -e "s//$MEMORY_LIMIT/g" /php/etc/php-fpm.conf + -e "s//$MEMORY_LIMIT/g" /php/etc/php-fpm.conf \ + -e "s//$CRON_PERIOD/g" /etc/s6.d/cron/run [ ! "$(ls -A /freshrss/data)" ] && cp -R /freshrss/data_tmp/* /freshrss/data/ chown -R $UID:$GID /freshrss /nginx /php /tmp /etc/s6.d