fix: support 1.3.0-rc10

This commit is contained in:
Matthieu Bessat 2023-09-17 16:18:01 +02:00
parent 38ec62c05c
commit 637937d5f6
7 changed files with 83 additions and 30 deletions

View file

@ -1,18 +1,16 @@
ARG ALPINE_VERSION=3.17 ARG ALPINE_VERSION=3.17
FROM alpine:${ALPINE_VERSION} FROM alpine:${ALPINE_VERSION}
LABEL Maintainer="HluthWigg" LABEL Maintainer="lefuturiste"
LABEL Description="Paheko on Alpine Linux with Docker" LABEL Description="Paheko on Alpine Linux with Docker"
# Volume expose # BORDEL DE MERDE, CEST APRES LES FROM POUR AVOIR LA VARIABLE EN BAS
VOLUME /var/www ARG PAHEKO_VERSION=1.3.0-rc10
VOLUME /var/www/paheko/data
# Setup document root
WORKDIR /var/www/ 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 \ RUN apk add --no-cache \
curl \ curl \
nginx \ nginx \
@ -24,13 +22,12 @@ RUN apk add --no-cache \
php81-gd \ php81-gd \
php81-intl \ php81-intl \
php81-mbstring \ php81-mbstring \
#php81-mysqli \
php81-opcache \ php81-opcache \
php81-openssl \ php81-openssl \
php81-phar \ php81-phar \
php81-session \ php81-session \
php81-sqlite3 \ php81-sqlite3 \
#php81-pdo_sqlite \ php81-pdo_sqlite \
php81-fileinfo \ php81-fileinfo \
php81-json \ php81-json \
php81-openssl \ php81-openssl \
@ -41,27 +38,30 @@ RUN apk add --no-cache \
supervisor \ supervisor \
gettext gettext
# Downloading and installing Garradin # BUILD the php-gnupg extension
RUN curl -L -O https://fossil.kd2.org/garradin/uv/paheko-$PAHEKO_VERSION.tar.gz # download RUN apk add --no-cache git make php81-dev build-base gpgme-dev
RUN tar xzvf paheko-$PAHEKO_VERSION.tar.gz # extract WORKDIR /tmp
RUN mv paheko-$PAHEKO_VERSION /var/www/paheko # root of the website RUN git clone --recursive https://github.com/php-gnupg/php-gnupg.git && cd php-gnupg \
RUN rm -r paheko-$PAHEKO_VERSION.tar.gz # cleaning && 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 # Download and install plugins
RUN cd /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
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/
# Create symlink so programs depending on `php` still function # Create symlink so programs depending on `php` still function
# RUN ln -s /usr/bin/php81 /usr/bin/php # RUN ln -s /usr/bin/php81 /usr/bin/php

24
config.local.php Normal file
View file

@ -0,0 +1,24 @@
<?php
namespace Paheko;
// Some random key of more than 31 characters
// openssl rand -base64 41
const SECRET_KEY = 'pCfzcII7HvAvGw2Q/bZpBaRxKf79vxr0TdFTyrbld9PahenxIrL6Pg==';
// SMTP parameters
const SMTP_HOST = 'mailcow.lefuturiste.fr';
const SMTP_PORT = 465;
const SMTP_SECURITY = 'TLS';
const SMTP_USER = 'ne-pas-repondre@etoiledebethleem.fr';
const SMTP_PASSWORD = 'ho1x8F6TLDAmQNhS8mlN';
// Upgrades should be handled by new docker image version
const ENABLE_UPGRADES = false;
// Storage quota
const FILE_STORAGE_QUOTA = 1*1024*1024*1024; // 1 Go
// Command line to use chromium to generate PDF documents
const PDF_COMMAND = 'chromium --no-sandbox --headless --disable-dev-shm-usage --autoplay-policy=no-user-gesture-required --no-first-run --disable-gpu --disable-features=DefaultPassthroughCommandDecoder --use-fake-ui-for-media-stream --use-fake-device-for-media-stream --disable-sync --print-to-pdf=%2$s %1$s';
const MAIL_SENDER = 'ne-pas-repondre@etoiledebethleem.fr';

View file

@ -19,7 +19,7 @@ server {
try_files $uri $uri/ /_route.php?$query_string; try_files $uri $uri/ /_route.php?$query_string;
include fastcgi.conf; include fastcgi.conf;
#fastcgi_pass 127.0.0.1:9000; # Si vous utilisez PHP-FPM (ou autre) en mode TCP et non sur une socket #fastcgi_pass 127.0.0.1:9000; # Si vous utilisez PHP-FPM (ou autre) en mode TCP et non sur une socket
fastcgi_pass unix:/run/garradin.sock; # Si vous utilisez PHP-FPM en mode socket fastcgi_pass unix:/run/paheko.sock; # Si vous utilisez PHP-FPM en mode socket
} }
location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {

View file

@ -1,2 +1,6 @@
[Date] [Date]
date.timezone="Europe/Paris" date.timezone="Europe/Paris"
[PHP]
extension=fileinfo
extension=gnupg

View file

@ -919,6 +919,7 @@ default_socket_timeout = 60
;extension=ffi ;extension=ffi
;extension=ftp ;extension=ftp
extension=fileinfo extension=fileinfo
extension=gnupg
;extension=gd ;extension=gd
;extension=gettext ;extension=gettext
;extension=gmp ;extension=gmp

12
docker-compose.yml Normal file
View file

@ -0,0 +1,12 @@
version: '3.1'
volumes:
paheko_data: {}
services:
paheko:
image: lefuturiste/paheko:1.3.0-rc10
restart: unless-stopped
volumes:
- ./config.local.php:/var/www/paheko/config.local.php
- paheko_data:/var/www/paheko/data:z
ports:
- 8085:80

12
patchs/plugins.patch Normal file
View file

@ -0,0 +1,12 @@
--- ./include/lib/Paheko/Plugins.php 2023-09-14 23:44:22.145170360 +0200
+++ ./include/lib/Paheko/Plugins.php.patched 2023-09-17 16:02:31.288229495 +0200
@@ -11,7 +11,7 @@
use Paheko\UserTemplate\Modules;
use KD2\DB\EntityManager as EM;
-use KD2\DB\ErrorManager;
+use KD2\ErrorManager;
use const Paheko\{SYSTEM_SIGNALS, ADMIN_URL, WWW_URL, PLUGINS_ROOT, HOSTING_PROVIDER};