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
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

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;
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 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)$ {

View file

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

View file

@ -919,6 +919,7 @@ default_socket_timeout = 60
;extension=ffi
;extension=ftp
extension=fileinfo
extension=gnupg
;extension=gd
;extension=gettext
;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};