fix docker
Some checks failed
Build, Push and Deploy / build-and-deploy (push) Failing after 1m57s
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s

This commit is contained in:
eko
2026-03-23 11:32:51 +07:00
parent edfc0f0680
commit bb599d7e0e

View File

@@ -28,23 +28,20 @@ COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
WORKDIR /var/www/html
# Copy ONLY composer files first (for better caching)
COPY composer.json composer.lock* ./
# Install dependencies (including laravel/prompts)
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader
# Copy the rest of the application files
# Copy ALL application files first (needed for custom autoload paths)
COPY --chown=www-data:www-data . .
# Create storage directories after copying files
# Create storage directories
RUN mkdir -p storage/framework/{cache,sessions,views} \
&& mkdir -p storage/logs \
&& mkdir -p bootstrap/cache \
&& chmod -R 777 storage \
&& chmod -R 777 bootstrap/cache
# Generate key (after composer install and storage setup)
# Install dependencies (now all app files exist for autoloading)
RUN composer install --no-dev --no-interaction --no-progress --optimize-autoloader
# Generate key (after composer install)
RUN php artisan key:generate --no-interaction --force
# Copy entrypoint script