├── .gitignore ├── .gitmodules ├── Dockerfile ├── Makefile ├── README.md ├── full-text-rss.service ├── fulltextrss └── start.sh /.gitignore: -------------------------------------------------------------------------------- 1 | *.swp 2 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "full-text-rss"] 2 | path = full-text-rss 3 | url = https://bitbucket.org/fivefilters/full-text-rss 4 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:buster-slim 2 | EXPOSE 80/tcp 3 | RUN apt-get update && apt-get install -y nginx php-common \ 4 | coreutils \ 5 | moreutils \ 6 | php-fpm \ 7 | php7.3-cli \ 8 | php7.3-common \ 9 | php7.3-curl \ 10 | php7.3-fpm \ 11 | php7.3-json \ 12 | php7.3-mbstring \ 13 | php7.3-opcache \ 14 | php7.3-readline \ 15 | php7.3-tidy \ 16 | php7.3-xml \ 17 | php7.3-intl 18 | ADD full-text-rss/ /var/www/full-text-rss 19 | COPY fulltextrss /etc/nginx/sites-available 20 | RUN mkdir /run/php && rm /etc/nginx/sites-enabled/default && \ 21 | ln -s /etc/nginx/sites-available/fulltextrss /etc/nginx/sites-enabled/fulltextrss && \ 22 | chown -R www-data:www-data /var/www/full-text-rss 23 | COPY start.sh /usr/local/bin 24 | ENTRYPOINT /usr/local/bin/start.sh 25 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | all:docker 3 | 4 | .PHONY: submodule 5 | submodule: 6 | git submodule init && git submodule update 7 | 8 | .PHONY: docker 9 | docker: submodule 10 | docker build -t full-text-rss . 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | `make` to build. 2 | 3 | I run this on localhost port 9999, with an RSSMAX of 20, like so: 4 | 5 | `docker run -p 127.0.0.1:9999:80 -e RSSMAX=20 -d full-text-rss` 6 | -------------------------------------------------------------------------------- /full-text-rss.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Full Text RSS 3 | 4 | [Service] 5 | ExecStart=docker run -p 127.0.0.1:9999:80 -e RSSMAX=20 -d full-text-rss 6 | 7 | [Install] 8 | WantedBy=default.target 9 | -------------------------------------------------------------------------------- /fulltextrss: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | 4 | root /var/www/full-text-rss; 5 | index index.php index.html index.htm; 6 | 7 | server_name fulltextrss; 8 | 9 | location / { 10 | try_files $uri $uri/ =404; 11 | } 12 | 13 | location ~ \.php$ { 14 | include snippets/fastcgi-php.conf; 15 | fastcgi_pass unix:/var/run/php/php7.3-fpm.sock; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /start.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | TARGET=/var/www/full-text-rss/config.php 4 | 5 | if test -z "$RSSMAX" 6 | then true 7 | else 8 | sed "s/max_entries\ \=\ 10/max_entries\ \=\ $RSSMAX/g" $TARGET | sponge $TARGET 9 | fi 10 | 11 | echo "RSSMAX is $RSSMAX" 12 | 13 | echo "starting php-fpm" 14 | /usr/sbin/php-fpm7.3 --fpm-config /etc/php/7.3/fpm/php-fpm.conf 15 | 16 | echo "starting nginx" 17 | /usr/sbin/nginx 18 | 19 | echo "sleep infinity" 20 | /bin/sleep infinity 21 | --------------------------------------------------------------------------------