blob: 0c55289d9b863e1c6dc687402838ac7ab57bf919 [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 Benkard8df0a142019-01-29 09:27:16 +01004ARG HUBZILLAVERSION=3.8.7
5ARG HUBZILLAADDONSVERSION=3.8.7
Matthias Andreas Benkardaf07b8f2018-07-16 06:57:40 +02006ARG 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 Benkard8878f922018-07-17 21:16:53 +020036 && curl https://framagit.org/hubzilla/core/-/archive/${HUBZILLAVERSION}/core-${HUBZILLAVERSION}.tar.gz | tar -xz --strip-components=1 -C /hubzilla -f - \
37 && curl https://framagit.org/hubzilla/addons/-/archive/${HUBZILLAADDONSVERSION}/addons-${HUBZILLAADDONSVERSION}.tar.gz | 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