feat: dockerfile
This commit is contained in:
-16
@@ -1,16 +1,3 @@
|
||||
# ── Stage 1 : build des assets frontend ─────────────────────────────────────
|
||||
FROM node:22-alpine AS frontend
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json package-lock.json* ./
|
||||
RUN npm ci --ignore-scripts
|
||||
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
|
||||
# ── Stage 2 : image de production PHP/FrankenPHP ─────────────────────────────
|
||||
FROM dunglas/frankenphp:php8.4-alpine
|
||||
|
||||
WORKDIR /app
|
||||
@@ -39,9 +26,6 @@ RUN composer install \
|
||||
|
||||
COPY . .
|
||||
|
||||
# Écrase public/build avec les assets compilés par le stage frontend
|
||||
COPY --from=frontend /app/public/build ./public/build
|
||||
|
||||
|
||||
RUN composer dump-autoload --optimize
|
||||
|
||||
|
||||
Reference in New Issue
Block a user