feat: npm run build dockerfile
Laravel CI-CD (Gitea) / Tests Unitaires (push) Successful in 17s Details
Laravel CI-CD (Gitea) / Build & Push Docker (push) Failing after 15s Details
Laravel CI-CD (Gitea) / Déploiement Simplifié (push) Has been skipped Details

This commit is contained in:
Leon 2026-03-19 10:24:51 +01:00
parent 85626b2499
commit 02312d35c0
1 changed files with 15 additions and 3 deletions

View File

@ -1,5 +1,5 @@
# --- Étape de Build ---
FROM composer:2.7 AS build
# --- Étape de Build (Composer) ---
FROM composer:2.7 AS composer-build
WORKDIR /var/www/html
@ -11,6 +11,17 @@ COPY . .
RUN composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader
# --- Étape de Build (Node) ---
FROM node:20-alpine AS node-build
WORKDIR /var/www/html
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# --- Étape Finale (Production) ---
FROM dunglas/frankenphp:1.3-php8.4-alpine
@ -33,7 +44,8 @@ RUN install-php-extensions \
WORKDIR /var/www/html
COPY --from=build /var/www/html /var/www/html
COPY --from=composer-build /var/www/html /var/www/html
COPY --from=node-build /var/www/html/public/build /var/www/html/public/build
# Permissions (crucial pour Laravel)
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache