blob: 5b27b26fe47e448b1c265a3b0e6d8e966379d0c7 [file] [log] [blame]
FROM alpine:3.7
MAINTAINER Silvio Fricke <silvio.fricke@gmail.com>
ARG HUBZILLAVERSION=4.4.1
ARG HUBZILLAADDONSVERSION=4.4.1
ARG REFRESH=0
ENTRYPOINT ["/start.sh"]
VOLUME /data
RUN set -ex \
&& apk update \
&& apk upgrade \
&& apk add \
bash \
curl \
dcron \
gd \
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 \
php5-iconv \
&& mkdir -p /run/nginx /hubzilla /hubzilla/addon \
&& curl https://framagit.org/hubzilla/core/-/archive/${HUBZILLAVERSION}/core-${HUBZILLAVERSION}.tar.gz | tar -xz --strip-components=1 -C /hubzilla -f - \
&& curl https://framagit.org/hubzilla/addons/-/archive/${HUBZILLAADDONSVERSION}/addons-${HUBZILLAADDONSVERSION}.tar.gz | 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 \
&& 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