blob: dcfba4dd46ffd6eef42c40f6376f3119b02d8144 [file] [log] [blame]
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +02001FROM alpine:3.7
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +02002MAINTAINER Silvio Fricke <silvio.fricke@gmail.com>
3
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +02004ARG HUBZILLAVERSION=3.4
5ARG HUBZILLAADDONSVERSION=3.4
6ARG REFRESH=0
7
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +02008ENTRYPOINT ["/start.sh"]
9VOLUME /data
10
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +020011RUN set -ex \
12 && apk update \
13 && apk upgrade \
14 && apk add \
15 bash \
16 curl \
17 dcron \
18 gd \
19 nginx \
20 openssl \
21 php5 \
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +020022 php5-ctype \
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +020023 php5-curl \
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +020024 php5-dom \
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +020025 php5-fpm \
26 php5-gd \
27 php5-json \
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +020028 php5-mcrypt \
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +020029 php5-pdo_mysql \
30 php5-pdo_pgsql \
31 php5-openssl \
32 php5-xml \
33 php5-zip \
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +020034 php5-iconv \
35 && mkdir -p /run/nginx /hubzilla /hubzilla/addon \
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +020036 && curl https://codeload.github.com/redmatrix/hubzilla/tar.gz/${HUBZILLAVERSION} | tar -xz --strip-components=1 -C /hubzilla -f - \
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +020037 && curl https://codeload.github.com/redmatrix/hubzilla-addons/tar.gz/${HUBZILLAADDONSVERSION} | tar -xz --strip-components=1 -C /hubzilla/addon -f - \
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +020038 && chown nginx:nginx -R /hubzilla \
39 && chmod 0777 /hubzilla \
40 && sed -i 's/;cgi.fix_pathinfo=1/cgi.fix_pathinfo=0/' /etc/php5/php.ini \
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +020041 && sed -i 's/pm.max_children = 5/pm.max_children = 16/' /etc/php5/php-fpm.conf \
Matthias Andreas Benkardc7d492a2017-07-29 10:02:55 +020042 && echo "*/###HUBZILLAINTERVAL### * * * * cd /hubzilla; /usr/bin/php Zotlabs/Daemon/Master.php Cron" > /hubzilla-cron.txt
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +020043
44WORKDIR /hubzilla
45COPY addons/longfeed.patch longfeed.patch
46RUN patch -p1 <longfeed.patch
47RUN rm longfeed.patch
48WORKDIR /
49
50COPY addons/nginx-server.conf /etc/nginx/conf.d/default.conf
51COPY addons/start.sh /start.sh
52
53ENV SERVERNAME=127.0.0.1
54ENV HUBZILLAINTERVAL=10