added npm run build
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -1,5 +1,17 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# 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
|
FROM php:8.3-fpm-alpine AS php_build
|
||||||
|
|
||||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||||
@@ -48,6 +60,8 @@ COPY . .
|
|||||||
RUN set -eux; \
|
RUN set -eux; \
|
||||||
composer install --no-dev --prefer-dist --optimize-autoloader --no-interaction --no-progress --no-scripts
|
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; \
|
RUN set -eux; \
|
||||||
mkdir -p storage/app/public storage/logs bootstrap/cache; \
|
mkdir -p storage/app/public storage/logs bootstrap/cache; \
|
||||||
chown -R www-data:www-data storage bootstrap/cache
|
chown -R www-data:www-data storage bootstrap/cache
|
||||||
|
|||||||
Reference in New Issue
Block a user