Files
Valentin Le Moign 48b7f97954 Stack d'orchestration Figures Libres (Docker Compose)
Câble ensemble le générateur (dépôt generator/) et le CMS Grav d'exemple
(dépôt grav-reference/, monté :ro), tous deux clonés côte à côte et non
versionnés ici. Contient : docker-compose dev + surcouche prod (rsync/SSH),
image Grav (docker/grav), doc de câblage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-05 18:38:04 +02:00

48 lines
1.3 KiB
Docker

FROM php:8.2-apache
# Match the container's web user to the host user so Grav can write to the
# bind-mounted app/ folder (cache, logs, tmp, user uploads, ...).
ARG PUID=1000
ARG PGID=1000
RUN groupmod -o -g "${PGID}" www-data \
&& usermod -o -u "${PUID}" www-data
# System deps for Grav's PHP extensions
RUN apt-get update && apt-get install -y --no-install-recommends \
libzip-dev \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libcurl4-openssl-dev \
libonig-dev \
libxml2-dev \
unzip \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j"$(nproc)" \
gd \
curl \
mbstring \
zip \
dom \
xml \
fileinfo \
exif \
opcache \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Grav ships its own .htaccess; enable rewrite + allow overrides
RUN a2enmod rewrite headers
RUN sed -ri -e 's!AllowOverride None!AllowOverride All!g' /etc/apache2/apache2.conf
# Sensible PHP settings for Grav
RUN { \
echo 'memory_limit=256M'; \
echo 'upload_max_filesize=32M'; \
echo 'post_max_size=32M'; \
echo 'max_execution_time=120'; \
} > /usr/local/etc/php/conf.d/grav.ini
WORKDIR /var/www/html