From 637937d5f688b0ee1677598485e93effa8380ee2 Mon Sep 17 00:00:00 2001 From: Matthieu Bessat Date: Sun, 17 Sep 2023 16:18:01 +0200 Subject: [PATCH] fix: support 1.3.0-rc10 --- Dockerfile | 58 ++++++++++++++++----------------- config.local.php | 24 ++++++++++++++ config/nginx-paheko.conf | 2 +- config/php-custom.ini | 4 +++ config/{phpFULL.ini => php.ini} | 1 + docker-compose.yml | 12 +++++++ patchs/plugins.patch | 12 +++++++ 7 files changed, 83 insertions(+), 30 deletions(-) create mode 100644 config.local.php rename config/{phpFULL.ini => php.ini} (99%) create mode 100644 docker-compose.yml create mode 100644 patchs/plugins.patch diff --git a/Dockerfile b/Dockerfile index 13f52f4..27a8236 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,16 @@ ARG ALPINE_VERSION=3.17 + FROM alpine:${ALPINE_VERSION} -LABEL Maintainer="HluthWigg" +LABEL Maintainer="lefuturiste" LABEL Description="Paheko on Alpine Linux with Docker" -# Volume expose -VOLUME /var/www +# BORDEL DE MERDE, CEST APRES LES FROM POUR AVOIR LA VARIABLE EN BAS +ARG PAHEKO_VERSION=1.3.0-rc10 + +VOLUME /var/www/paheko/data -# Setup document root WORKDIR /var/www/ -# Change the version here -ENV PAHEKO_VERSION 1.2.6 - -# Install packages and remove default server definition RUN apk add --no-cache \ curl \ nginx \ @@ -24,13 +22,12 @@ RUN apk add --no-cache \ php81-gd \ php81-intl \ php81-mbstring \ - #php81-mysqli \ php81-opcache \ php81-openssl \ php81-phar \ php81-session \ php81-sqlite3 \ - #php81-pdo_sqlite \ + php81-pdo_sqlite \ php81-fileinfo \ php81-json \ php81-openssl \ @@ -41,27 +38,30 @@ RUN apk add --no-cache \ supervisor \ gettext -# Downloading and installing Garradin -RUN curl -L -O https://fossil.kd2.org/garradin/uv/paheko-$PAHEKO_VERSION.tar.gz # download -RUN tar xzvf paheko-$PAHEKO_VERSION.tar.gz # extract -RUN mv paheko-$PAHEKO_VERSION /var/www/paheko # root of the website -RUN rm -r paheko-$PAHEKO_VERSION.tar.gz # cleaning +# BUILD the php-gnupg extension +RUN apk add --no-cache git make php81-dev build-base gpgme-dev +WORKDIR /tmp +RUN git clone --recursive https://github.com/php-gnupg/php-gnupg.git && cd php-gnupg \ + && phpize && ./configure && make && make install + + +WORKDIR /var/www/ + +# Downloading and installing paheko +# https://fossil.kd2.org/paheko/uv/paheko-1.3.0-rc10.tar.gz +RUN curl -v -L -O "https://fossil.kd2.org/paheko/uv/paheko-${PAHEKO_VERSION}.tar.gz" +RUN tar xf paheko-${PAHEKO_VERSION}.tar.gz +RUN rm -rf *.tar.gz +RUN mv paheko-${PAHEKO_VERSION} /var/www/paheko +RUN echo ${PAHEKO_VERSION} > /paheko_version +RUN cat /var/www/paheko/VERSION + +# apply quick patch +COPY ./patchs /patchs +RUN cd paheko && patch -p1 < /patchs/plugins.patch # Download and install plugins -RUN cd /var/www/paheko/data/plugins && \ -curl -L -O https://fossil.kd2.org/garradin-plugins/uv/ouvertures.tar.gz ; \ -curl -L -O https://fossil.kd2.org/garradin-plugins/uv/stock_velos.tar.gz ; \ -curl -L -O https://fossil.kd2.org/garradin-plugins/uv/reservations.tar.gz ; \ -curl -L -O https://fossil.kd2.org/garradin-plugins/uv/webstats.tar.gz ; \ -curl -L -O https://fossil.kd2.org/garradin-plugins/uv/dompdf.tar.gz ; \ -curl -L -O https://fossil.kd2.org/garradin-plugins/uv/git_documents.tar.gz ; \ -curl -L -O https://fossil.kd2.org/garradin-plugins/uv/taima.tar.gz ; \ -curl -L -O https://fossil.kd2.org/garradin-plugins/uv/caisse.tar.gz ; -#RUN curl -L -O https://fossil.kd2.org/garradin-plugins/uv/helloasso.tar.gz -#RUN curl -L -O https://fossil.kd2.org/garradin-plugins/uv/dompdf.tar.gz -#RUN curl -L -O https://fossil.kd2.org/garradin-plugins/uv/taima.tar.gz -#RUN mv helloasso.tar.gz /var/www/paheko/data/plugins/ -#RUN mv *.tar.gz /var/www/paheko/data/plugins/ +RUN cd /var/www/paheko/data/plugins && curl -L -O https://fossil.kd2.org/paheko-plugins/uv/helloasso.tar.gz # Create symlink so programs depending on `php` still function # RUN ln -s /usr/bin/php81 /usr/bin/php diff --git a/config.local.php b/config.local.php new file mode 100644 index 0000000..9e30a54 --- /dev/null +++ b/config.local.php @@ -0,0 +1,24 @@ +