Phase 0 : scaffolding complet
- Structure monorepo (backend Symfony, frontend React/Vite) - Docker : FrankenPHP + PostgreSQL/PostGIS + Redis + Traefik labels - Caddyfile, Dockerfile, .env.example, .gitignore - MapLibre GL JS + react-map-gl installés - Roadmap mise à jour Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
25
docker/php/Caddyfile
Normal file
25
docker/php/Caddyfile
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
frankenphp
|
||||
order php_server before file_server
|
||||
}
|
||||
|
||||
:80 {
|
||||
root * /app/public
|
||||
|
||||
# Assets Symfony
|
||||
handle /bundles/* {
|
||||
file_server
|
||||
}
|
||||
|
||||
# SPA React (fichiers statiques buildés dans public/spa/)
|
||||
handle /spa/* {
|
||||
file_server
|
||||
}
|
||||
|
||||
# Tout le reste → Symfony (front controller index.php)
|
||||
handle {
|
||||
php_server
|
||||
}
|
||||
|
||||
encode gzip
|
||||
}
|
||||
36
docker/php/Dockerfile
Normal file
36
docker/php/Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
FROM dunglas/frankenphp:latest-php8.3
|
||||
|
||||
# Dépendances système
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libpq-dev \
|
||||
libzip-dev \
|
||||
unzip \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Extensions PHP
|
||||
RUN install-php-extensions \
|
||||
pdo_pgsql \
|
||||
pgsql \
|
||||
redis \
|
||||
zip \
|
||||
intl \
|
||||
opcache \
|
||||
apcu
|
||||
|
||||
# Composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Copie des dépendances en premier (cache Docker)
|
||||
COPY backend/composer.json backend/composer.lock ./
|
||||
RUN composer install --no-dev --optimize-autoloader --no-scripts
|
||||
|
||||
# Copie du reste
|
||||
COPY backend/ .
|
||||
|
||||
RUN composer dump-autoload --optimize \
|
||||
&& php bin/console cache:warmup --env=prod
|
||||
|
||||
COPY docker/php/Caddyfile /etc/caddy/Caddyfile
|
||||
Reference in New Issue
Block a user