diff --git a/Dockerfile b/Dockerfile index a2de64c..8e9f862 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,40 +1,33 @@ -# set base os -FROM linuxserver/baseimage.apache -MAINTAINER Sparklyballs +FROM lsiobase/alpine.nginx:3.5 +MAINTAINER sparklyballs # set version label ARG BUILD_DATE ARG VERSION LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}" -# copy sources.list -COPY sources.list /etc/apt/ +# install packages +RUN \ + apk add --no-cache \ + git \ + php7-ctype \ + php7-curl \ + php7-dom \ + php7-gmp \ + php7-intl \ + php7-mysqlnd \ + php7-pdo_mysql \ + php7-pdo_pgsql \ + php7-pdo_sqlite \ + php7-pgsql \ + php7-sqlite3 \ + php7-xml \ + php7-zip \ + sqlite -# Set correct environment variables -ENV APTLIST="git-core php5-gmp php5-intl php5-mysqlnd php5-pgsql php5-sqlite sqlite" \ -LANG="en_US.UTF-8" LANGUAGE="en_US:en" LC_ALL="en_US.UTF-8" +# copy local files +COPY root/ / -# Set the locale -RUN locale-gen en_US.UTF-8 - -# update apt and install dependencies -RUN apt-get update && \ -apt-get install \ -$APTLIST -qy && \ - -# cleanup -apt-get clean -y && \ -rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# add some files -ADD defaults/ /defaults/ -ADD cron/ /etc/cron.d/ -ADD init/ /etc/my_init.d/ -RUN chmod -v +x /etc/service/*/run /etc/my_init.d/*.sh -RUN chmod 600 /etc/cron.d/freshrss - -# expose ports -EXPOSE 80 - -# set volumes +# ports and volumes +EXPOSE 80 443 VOLUME /config diff --git a/README.md b/README.md index 409a73b..253bde3 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,7 @@ Create a user and database in your mysql/mariadb server (not root) and then foll ## Versions ++ **23.02.17:** Rebase to alpine linux 3.5 and nginx. + **14.10.16:** Add version layer information. + **08.10.16:** Add Sqlite support for standalone operation. + **27.09.16:** Fix for cron job. diff --git a/cron/freshrss b/cron/freshrss deleted file mode 100644 index 39a5406..0000000 --- a/cron/freshrss +++ /dev/null @@ -1 +0,0 @@ -*/15 * * * * root /usr/bin/php /config/www/freshrss/app/actualize_script.php > /tmp/FreshRSS.log 2>&1 diff --git a/defaults/default.conf b/defaults/default.conf deleted file mode 100644 index 554dbbf..0000000 --- a/defaults/default.conf +++ /dev/null @@ -1,15 +0,0 @@ - -ServerAdmin me@mydomain.com -DocumentRoot /config/www//freshrss -DirectoryIndex index.html index.php - - - -Options Indexes FollowSymLinks MultiViews - AllowOverride All - Order allow,deny - allow from all - - - - diff --git a/init/50_set_the_site.sh b/init/50_set_the_site.sh deleted file mode 100644 index f072598..0000000 --- a/init/50_set_the_site.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash -[[ ! -f /config/www/freshrss/index.php ]] && (git clone https://github.com/FreshRSS/FreshRSS.git /config/www/freshrss && \ -chown -R abc:abc /config) - -# opt out for autoupdates -[ "$ADVANCED_DISABLEUPDATES" ] && exit 0 - -cd /config/www/freshrss || exit -git pull -chown -R abc:abc /config diff --git a/root/defaults/default b/root/defaults/default new file mode 100644 index 0000000..5f143bf --- /dev/null +++ b/root/defaults/default @@ -0,0 +1,30 @@ +server { + listen 80 default_server; + + listen 443 ssl; + + root /config/www/freshrss; + index index.html index.htm index.php; + + server_name _; + + ssl_certificate /config/keys/cert.crt; + ssl_certificate_key /config/keys/cert.key; + + client_max_body_size 0; + + location / { + try_files $uri $uri/ /index.html /index.php?$args =404; + } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + # With php5-cgi alone: + fastcgi_pass 127.0.0.1:9000; + # With php5-fpm: + #fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_index index.php; + include /etc/nginx/fastcgi_params; + + } +} diff --git a/root/defaults/freshrss b/root/defaults/freshrss new file mode 100644 index 0000000..cbf956a --- /dev/null +++ b/root/defaults/freshrss @@ -0,0 +1 @@ +*/15 * * * * root /usr/bin/php7 /config/www/freshrss/app/actualize_script.php > /tmp/FreshRSS.log 2>&1 diff --git a/root/etc/cont-init.d/40-install b/root/etc/cont-init.d/40-install new file mode 100644 index 0000000..11f9927 --- /dev/null +++ b/root/etc/cont-init.d/40-install @@ -0,0 +1,12 @@ +#!/usr/bin/with-contenv bash + +# install freshrss +[[ ! -f /config/www/freshrss/index.php ]] && \ + git clone https://github.com/FreshRSS/FreshRSS.git /config/www/freshrss + +# set cronjob +crontab /defaults/freshrss + +# permissions +chown -R abc:abc \ + /config diff --git a/sources.list b/sources.list deleted file mode 100644 index 73911f5..0000000 --- a/sources.list +++ /dev/null @@ -1,38 +0,0 @@ -# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to -# newer versions of the distribution. - -deb http://archive.ubuntu.com/ubuntu/ trusty main restricted -deb-src http://archive.ubuntu.com/ubuntu/ trusty main restricted - -## Major bug fix updates produced after the final release of the -## distribution. -deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted -deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted - -## Uncomment the following two lines to add software from the 'universe' -## repository. -## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu -## team. Also, please note that software in universe WILL NOT receive any -## review or updates from the Ubuntu security team. -deb http://archive.ubuntu.com/ubuntu/ trusty universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ trusty universe multiverse -deb http://archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ trusty-updates universe multiverse - -## N.B. software from this repository may not have been tested as -## extensively as that contained in the main release, although it includes -## newer versions of some applications which may provide useful features. -## Also, please note that software in backports WILL NOT receive any review -## or updates from the Ubuntu security team. -# deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted -# deb-src http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted - -deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted -deb-src http://archive.ubuntu.com/ubuntu/ trusty-security main restricted -deb http://archive.ubuntu.com/ubuntu/ trusty-security universe multiverse -deb-src http://archive.ubuntu.com/ubuntu/ trusty-security universe multiverse - - - - -