mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-05-11 22:59:18 +00:00
freshrss: add automatic feed update
This commit is contained in:
parent
9dc8f2b2b8
commit
28f04a1865
@ -4,7 +4,8 @@ ARG FRESHRSS_VER=1.7.0
|
|||||||
|
|
||||||
ENV UID=991 GID=991 \
|
ENV UID=991 GID=991 \
|
||||||
UPLOAD_MAX_SIZE=10M \
|
UPLOAD_MAX_SIZE=10M \
|
||||||
MEMORY_LIMIT=128M
|
MEMORY_LIMIT=128M \
|
||||||
|
CRON_PERIOD=30m
|
||||||
|
|
||||||
RUN apk -U add --no-cache \
|
RUN apk -U add --no-cache \
|
||||||
tar \
|
tar \
|
||||||
|
@ -5,6 +5,7 @@ A free, self-hostable aggregator : https://github.com/FreshRSS/FreshRSS
|
|||||||
#### Features
|
#### Features
|
||||||
- Based on Alpine Linux (wonderfall/nginx-php image)
|
- Based on Alpine Linux (wonderfall/nginx-php image)
|
||||||
- Bundled with nginx and PHP7.1.
|
- Bundled with nginx and PHP7.1.
|
||||||
|
- Automatic feed update (frequency at 30 minutes by default)
|
||||||
|
|
||||||
#### Build-time variables
|
#### Build-time variables
|
||||||
- **FRESHRSS_VER** : version of FreshRSS
|
- **FRESHRSS_VER** : version of FreshRSS
|
||||||
@ -14,6 +15,7 @@ A free, self-hostable aggregator : https://github.com/FreshRSS/FreshRSS
|
|||||||
- **GID** : group id
|
- **GID** : group id
|
||||||
- **MEMORY_LIMIT** : php memory limit *(default : 128M)*
|
- **MEMORY_LIMIT** : php memory limit *(default : 128M)*
|
||||||
- **UPLOAD_MAX_SIZE** : maximum upload size *(default : 10M)*
|
- **UPLOAD_MAX_SIZE** : maximum upload size *(default : 10M)*
|
||||||
|
- **CRON_PERIOD** : feed update frequency *(default : 30m)*
|
||||||
|
|
||||||
#### Volumes
|
#### Volumes
|
||||||
- **/freshrss/data**
|
- **/freshrss/data**
|
||||||
|
6
freshrss/rootfs/etc/s6.d/cron/run
Normal file
6
freshrss/rootfs/etc/s6.d/cron/run
Normal file
@ -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
|
#!/bin/sh
|
||||||
sed -i -e "s/<UPLOAD_MAX_SIZE>/$UPLOAD_MAX_SIZE/g" /nginx/conf/nginx.conf /php/etc/php-fpm.conf \
|
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/
|
[ ! "$(ls -A /freshrss/data)" ] && cp -R /freshrss/data_tmp/* /freshrss/data/
|
||||||
chown -R $UID:$GID /freshrss /nginx /php /tmp /etc/s6.d
|
chown -R $UID:$GID /freshrss /nginx /php /tmp /etc/s6.d
|
||||||
|
Loading…
x
Reference in New Issue
Block a user