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
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:
14
Dockerfile
14
Dockerfile
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user