1
0
mirror of https://github.com/hoellen/dockerfiles.git synced 2025-05-11 06:39:16 +00:00

freshrss: add automatic feed update

This commit is contained in:
Wonderfall 2017-06-06 03:24:05 +02:00
parent 9dc8f2b2b8
commit 28f04a1865
4 changed files with 12 additions and 2 deletions
freshrss
DockerfileREADME.md
rootfs
etc/s6.d/cron
usr/local/bin

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

@ -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**

@ -0,0 +1,6 @@
#!/bin/sh
while true; do
php -f /freshrss/app/actualize_script.php
sleep <CRON_PERIOD>
done

@ -1,6 +1,7 @@
#!/bin/sh
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /nginx/conf/nginx.conf /php/etc/php-fpm.conf \
-e "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /php/etc/php-fpm.conf
-e "s/<MEMORY_LIMIT>/$MEMORY_LIMIT/g" /php/etc/php-fpm.conf \
-e "s/<CRON_PERIOD>/$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