Update Hubzilla, enable long news feed.
diff --git a/forks/hubzilla-docker/Dockerfile b/forks/hubzilla-docker/Dockerfile
index a2a6df7..dcfba4d 100644
--- a/forks/hubzilla-docker/Dockerfile
+++ b/forks/hubzilla-docker/Dockerfile
@@ -1,20 +1,13 @@
-
-FROM alpine:3.5
+FROM alpine:3.7
MAINTAINER Silvio Fricke <silvio.fricke@gmail.com>
+ARG HUBZILLAVERSION=3.4
+ARG HUBZILLAADDONSVERSION=3.4
+ARG REFRESH=0
+
ENTRYPOINT ["/start.sh"]
VOLUME /data
-ADD addons/nginx-server.conf /etc/nginx/conf.d/default.conf
-ADD addons/start.sh /start.sh
-
-# useable for any git references
-ENV HUBZILLAVERSION 2.4
-
-ENV HUBZILLAINTERVAL 10
-env SERVERNAME 127.0.0.1
-
-
RUN set -ex \
&& apk update \
&& apk upgrade \
@@ -26,19 +19,36 @@
nginx \
openssl \
php5 \
+ php5-ctype \
php5-curl \
+ php5-dom \
php5-fpm \
php5-gd \
php5-json \
+ php5-mcrypt \
php5-pdo_mysql \
php5-pdo_pgsql \
php5-openssl \
php5-xml \
php5-zip \
- && mkdir -p /run/nginx /hubzilla \
+ php5-iconv \
+ && mkdir -p /run/nginx /hubzilla /hubzilla/addon \
&& curl https://codeload.github.com/redmatrix/hubzilla/tar.gz/${HUBZILLAVERSION} | tar -xz --strip-components=1 -C /hubzilla -f - \
+ && curl https://codeload.github.com/redmatrix/hubzilla-addons/tar.gz/${HUBZILLAADDONSVERSION} | tar -xz --strip-components=1 -C /hubzilla/addon -f - \
&& chown nginx:nginx -R /hubzilla \
&& chmod 0777 /hubzilla \
&& sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php5/php.ini \
- && chmod u+x /start.sh \
+ && sed -i 's/pm.max_children = 5/pm.max_children = 16/' /etc/php5/php-fpm.conf \
&& echo "*/###HUBZILLAINTERVAL### * * * * cd /hubzilla; /usr/bin/php Zotlabs/Daemon/Master.php Cron" > /hubzilla-cron.txt
+
+WORKDIR /hubzilla
+COPY addons/longfeed.patch longfeed.patch
+RUN patch -p1 <longfeed.patch
+RUN rm longfeed.patch
+WORKDIR /
+
+COPY addons/nginx-server.conf /etc/nginx/conf.d/default.conf
+COPY addons/start.sh /start.sh
+
+ENV SERVERNAME=127.0.0.1
+ENV HUBZILLAINTERVAL=10
diff --git a/forks/hubzilla-docker/addons/longfeed.patch b/forks/hubzilla-docker/addons/longfeed.patch
new file mode 100644
index 0000000..a0658e6
--- /dev/null
+++ b/forks/hubzilla-docker/addons/longfeed.patch
@@ -0,0 +1,11 @@
+--- a/Zotlabs/Module/Feed.php
++++ b/Zotlabs/Module/Feed.php
+@@ -17,7 +17,7 @@ class Feed extends \Zotlabs\Web\Controller {
+ $params['pages'] = ((x($_REQUEST,'pages')) ? intval($_REQUEST['pages']) : 0);
+ $params['top'] = ((x($_REQUEST,'top')) ? intval($_REQUEST['top']) : 0);
+ $params['start'] = ((x($_REQUEST,'start')) ? intval($_REQUEST['start']) : 0);
+- $params['records'] = ((x($_REQUEST,'records')) ? intval($_REQUEST['records']) : 40);
++ $params['records'] = ((x($_REQUEST,'records')) ? intval($_REQUEST['records']) : 400000);
+ $params['direction'] = ((x($_REQUEST,'direction')) ? dbesc($_REQUEST['direction']) : 'desc');
+ $params['cat'] = ((x($_REQUEST,'cat')) ? escape_tags($_REQUEST['cat']) : '');
+ $params['compat'] = ((x($_REQUEST,'compat')) ? intval($_REQUEST['compat']) : 0);
diff --git a/forks/hubzilla-docker/addons/start.sh b/forks/hubzilla-docker/addons/start.sh
old mode 100644
new mode 100755
index 086c932..1a88819
--- a/forks/hubzilla-docker/addons/start.sh
+++ b/forks/hubzilla-docker/addons/start.sh
@@ -4,21 +4,26 @@
ln -sf /data/htconfig.php /hubzilla/.htconfig.php
chmod -R 0777 /data/htconfig.php
+crond
+
if [ ! -e /data/store ]; then
mkdir /data/store
- ln -sf /data/store /hubzilla/store
mkdir -p '/data/store/[data]/smarty3'
chmod -R 0777 /data/store
-else
- sed -i "s/###HUBZILLAINTERVAL###/${HUBZILLAINTERVAL}/" /hubzilla-cron.txt
- crontab /hubzilla-cron.txt
fi
+ln -sf /data/store /hubzilla/store
+sed -i "s/###HUBZILLAINTERVAL###/${HUBZILLAINTERVAL}/" /hubzilla-cron.txt
+crontab /hubzilla-cron.txt
sed -i "s/###SERVERNAME###/${SERVERNAME}/" /etc/nginx/conf.d/default.conf
+if [ -n "${FRONTEND_IP}" ]; then
+ echo "${FRONTEND_IP} ${SERVERNAME}" >>/etc/hosts
+fi
+
nginx
-php-fpm
+php-fpm5
tail -F /var/log/*.log /var/log/nginx/*.log