fix docker
All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 8s
Build, Push and Deploy / build-and-push (push) Successful in 2m39s
Build, Push and Deploy / deploy-staging (push) Successful in 22s
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 15:42:51 +07:00
parent a234bc497e
commit 74e6666da5

View File

@@ -42,15 +42,26 @@ RUN find . -type d -name "vendor" -not -path "./vendor*" -exec rm -rf {} + 2>/de
# Remove composer.lock to ensure fresh install
RUN rm -f composer.lock
# Create all necessary directories
RUN mkdir -p storage/framework/{cache,sessions,views,testing} \
# Create ALL storage directories BEFORE composer install
RUN mkdir -p storage/framework/cache \
&& mkdir -p storage/framework/sessions \
&& mkdir -p storage/framework/views \
&& mkdir -p storage/framework/testing \
&& mkdir -p storage/logs \
&& mkdir -p bootstrap/cache \
&& mkdir -p storage/framework/cache/data \
&& chmod -R 777 storage \
&& chmod -R 777 bootstrap/cache
# Install PHP dependencies (full install, not just --no-scripts)
# Create a temporary config file to avoid cache path issues during composer
RUN if [ ! -f config/app.php ]; then \
echo "<?php return ['providers' => []];" > config/app.php; \
fi
# Set environment variable for cache path
ENV VIEW_COMPILED_PATH=/var/www/html/storage/framework/views
# Install PHP dependencies
RUN composer install --no-interaction --no-progress --optimize-autoloader
# Verify critical files exist