From 05777cff8e92a944f1c473509e158e1ee7ed8630 Mon Sep 17 00:00:00 2001 From: soeren Date: Sun, 7 Dec 2025 20:40:36 +0100 Subject: [PATCH] added npm run build --- Dockerfile | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/Dockerfile b/Dockerfile index 1ee99ea..7b8c41d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,17 @@ # syntax=docker/dockerfile:1 +FROM node:20-alpine AS frontend_build + +WORKDIR /var/www/html + +COPY package*.json ./ +RUN npm ci --ignore-scripts + +COPY resources resources +COPY postcss.config.js tailwind.config.js vite.config.mjs jsconfig.json ./ + +RUN npm run build + FROM php:8.3-fpm-alpine AS php_build ENV COMPOSER_ALLOW_SUPERUSER=1 @@ -48,6 +60,8 @@ COPY . . RUN set -eux; \ composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction --no-progress --no-scripts +COPY --from=frontend_build /var/www/html/public/build /var/www/html/public/build + RUN set -eux; \ mkdir -p storage/app/public storage/logs bootstrap/cache; \ chown -R www-data:www-data storage bootstrap/cache