add vite
Some checks failed
Build, Push and Deploy / build-and-push (push) Failing after 1m33s
Gitea Actions Demo / Explore-Gitea-Actions (push) Failing after 8s
Build, Push and Deploy / deploy-staging (push) Has been skipped
Build, Push and Deploy / deploy-production (push) Has been skipped
Build, Push and Deploy / cleanup (push) Successful in 1s

This commit is contained in:
eko
2026-03-29 13:48:35 +07:00
parent 7c985008d1
commit f1b383fbc7
2 changed files with 22 additions and 1 deletions

View File

@@ -12,6 +12,8 @@ RUN apk add --no-cache \
oniguruma-dev \
git \
curl \
nodejs \
npm \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install -j$(nproc) \
pdo_pgsql \
@@ -28,6 +30,13 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
# Copy package files first for better caching
COPY package*.json ./
COPY vite.config.js ./
# Install NPM dependencies
RUN npm ci --no-audit --no-fund
# Copy application files
COPY --chown=www-data:www-data . .
@@ -41,7 +50,10 @@ RUN mkdir -p storage/framework/{cache,sessions,views} \
&& chmod -R 777 storage \
&& chmod -R 777 bootstrap/cache
# Install dependencies
# Build Vite assets (this generates manifest.json)
RUN npm run build
# Install PHP dependencies
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader --no-scripts \
&& composer run-script post-autoload-dump \
&& php artisan package:discover --ansi || true