first commit
This commit is contained in:
commit
b649e6bf24
|
@ -0,0 +1,26 @@
|
||||||
|
FROM wonderfall/nginx-php
|
||||||
|
|
||||||
|
ARG FRESHRSS_VER=1.8.0
|
||||||
|
|
||||||
|
ENV UID=991 GID=991 \
|
||||||
|
UPLOAD_MAX_SIZE=10M \
|
||||||
|
MEMORY_LIMIT=128M \
|
||||||
|
CRON_PERIOD=30m
|
||||||
|
|
||||||
|
RUN apk -U add --no-cache \
|
||||||
|
tar \
|
||||||
|
libressl \
|
||||||
|
ca-certificates \
|
||||||
|
&& mkdir freshrss && cd freshrss \
|
||||||
|
&& wget -qO- https://github.com/FreshRSS/FreshRSS/archive/${FRESHRSS_VER}.tar.gz | tar xz --strip 1 \
|
||||||
|
&& mv data data_tmp
|
||||||
|
|
||||||
|
COPY rootfs /
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/run.sh /etc/s6.d/*/* /etc/s6.d/.s6-svscan/*
|
||||||
|
|
||||||
|
VOLUME /freshrss/data /php/session
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
CMD ["run.sh"]
|
|
@ -0,0 +1,24 @@
|
||||||
|
## wonderfall/freshrss
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
#### Environment variables
|
||||||
|
- **UID** : user id
|
||||||
|
- **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**
|
||||||
|
|
||||||
|
#### Ports
|
||||||
|
- **8888** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
|
@ -0,0 +1,6 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
while true; do
|
||||||
|
php -f /freshrss/app/actualize_script.php
|
||||||
|
sleep <CRON_PERIOD>
|
||||||
|
done
|
|
@ -0,0 +1,37 @@
|
||||||
|
server {
|
||||||
|
listen 8080;
|
||||||
|
root /freshrss/p;
|
||||||
|
index index.php index.html;
|
||||||
|
|
||||||
|
location ~* \.(jpg|jpeg|gif|css|png|js|map|woff|woff2|ttf|svg|eot)$ {
|
||||||
|
expires 30d;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^/(data|cfg|tmp) {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ /\. {
|
||||||
|
deny all;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ index.php;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ ^.+?\.php(/.*)?$ {
|
||||||
|
fastcgi_index index.php;
|
||||||
|
fastcgi_pass unix:/php/run/php-fpm.sock;
|
||||||
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
include /nginx/conf/fastcgi_params;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,8 @@
|
||||||
|
#!/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/<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
|
||||||
|
exec su-exec $UID:$GID /bin/s6-svscan /etc/s6.d
|
Reference in New Issue