From 8a39d010d8833b5f26d9c592a9decbf7a32dbd31 Mon Sep 17 00:00:00 2001 From: Pierre Date: Mon, 5 Oct 2026 16:40:14 +0000 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20du=20docker=20afin=20qu'?= =?UTF-8?q?il=20d=C3=A9clare=20un=20second=20port=20interne,=208081,=20ser?= =?UTF-8?q?vant=20/var/www/live?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 18 ++++++++++++++++++ Dockerfile_OLD | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 Dockerfile_OLD diff --git a/Dockerfile b/Dockerfile index 5e151e3..26fb8a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,3 +24,21 @@ RUN groupadd -g 1001 koriolan_grp && usermod -aG koriolan_grp www-data # la requête POST, pas seulement le fichier) - cf synthèse §37. RUN echo "upload_max_filesize = 20M" > /usr/local/etc/php/conf.d/upload-limits.ini RUN echo "post_max_size = 20M" >> /usr/local/etc/php/conf.d/upload-limits.ini + +# Vérificateur du Live distant (synthèse §49) : second port INTERNE 8081, servant /var/www/live (hors du site public +# /var/www/html). Aucun port publié et aucun routeur Traefik public vers ce port : seul Traefik l'appelle (ForwardAuth +# et ouverture de session), par le réseau Docker. commun.php (fonctions) n'est pas appelable directement. +RUN echo "Listen 8081" >> /etc/apache2/ports.conf \ + && printf '%s\n' \ + '' \ + ' DocumentRoot /var/www/live' \ + ' ' \ + ' Options -Indexes' \ + ' AllowOverride None' \ + ' Require all granted' \ + ' ' \ + ' Require all denied' \ + ' ' \ + ' ' \ + '' > /etc/apache2/sites-available/live.conf \ + && a2ensite live \ No newline at end of file diff --git a/Dockerfile_OLD b/Dockerfile_OLD new file mode 100644 index 0000000..ec22273 --- /dev/null +++ b/Dockerfile_OLD @@ -0,0 +1,20 @@ +FROM php:8.2-apache +RUN docker-php-ext-install mysqli pdo pdo_mysql +RUN a2enmod rewrite +RUN a2enmod headers +RUN sed -i '//,/<\/Directory>/ s/AllowOverride None/AllowOverride All/' /etc/apache2/apache2.conf +RUN echo "error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE" > /usr/local/etc/php/conf.d/error-reporting.ini +RUN echo "display_errors = On" >> /usr/local/etc/php/conf.d/error-reporting.ini + +# www-data doit pouvoir écrire dans /home/koriolan/versions/shipheart (monté depuis l'hôte, propriétaire +# uid/gid 1001 - probablement l'utilisateur koriolan du VPS) - nécessaire pour la génération de package +# depuis la partie Administration du site (cf synthèse §37). Ajout au groupe plutôt que modification des +# permissions/propriétaire côté hôte, pour ne rien changer à ce qui existe déjà en dehors du conteneur. +RUN groupadd -g 1001 koriolan_grp && usermod -aG koriolan_grp www-data + +# Valeur par défaut de l'image (2M) trop faible pour l'upload de packages (jusqu'à 5 Mo aujourd'hui, +# cf MAX_TAILLE_FICHIER_VERSION) - marge prise à 20M pour ne pas avoir à y revenir si un futur package +# grossit. post_max_size doit rester supérieur ou égal à upload_max_filesize (limite le corps entier de +# la requête POST, pas seulement le fichier) - cf synthèse §37. +RUN echo "upload_max_filesize = 20M" > /usr/local/etc/php/conf.d/upload-limits.ini +RUN echo "post_max_size = 20M" >> /usr/local/etc/php/conf.d/upload-limits.ini