36 lines
875 B
Docker
36 lines
875 B
Docker
FROM dunglas/frankenphp:latest-php8.3
|
|
|
|
# Dépendances système (GDAL pour vectorisation satellite)
|
|
RUN apt-get update && apt-get install -y \
|
|
libpq-dev \
|
|
libzip-dev \
|
|
unzip \
|
|
git \
|
|
gdal-bin \
|
|
python3-gdal \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
# Extensions PHP
|
|
RUN install-php-extensions \
|
|
pdo_pgsql \
|
|
pgsql \
|
|
redis \
|
|
zip \
|
|
intl \
|
|
opcache \
|
|
apcu
|
|
|
|
# Composer (utilisé par le hook post-receive dans le container)
|
|
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
|
|
|
WORKDIR /app
|
|
|
|
COPY docker/php/Caddyfile /etc/caddy/Caddyfile
|
|
|
|
# Le code source et vendor/ sont injectés par volume mount (./backend:/app)
|
|
# Le cache warmup nécessite .env.local → fait au démarrage, pas au build
|
|
COPY docker/php/entrypoint.sh /usr/local/bin/entrypoint.sh
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
|
|
|
ENTRYPOINT ["entrypoint.sh"]
|