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
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:
17
Dockerfile
17
Dockerfile
@@ -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
|
# Remove composer.lock to ensure fresh install
|
||||||
RUN rm -f composer.lock
|
RUN rm -f composer.lock
|
||||||
|
|
||||||
# Create all necessary directories
|
# Create ALL storage directories BEFORE composer install
|
||||||
RUN mkdir -p storage/framework/{cache,sessions,views,testing} \
|
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 storage/logs \
|
||||||
&& mkdir -p bootstrap/cache \
|
&& mkdir -p bootstrap/cache \
|
||||||
&& mkdir -p storage/framework/cache/data \
|
&& mkdir -p storage/framework/cache/data \
|
||||||
&& chmod -R 777 storage \
|
&& chmod -R 777 storage \
|
||||||
&& chmod -R 777 bootstrap/cache
|
&& 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
|
RUN composer install --no-interaction --no-progress --optimize-autoloader
|
||||||
|
|
||||||
# Verify critical files exist
|
# Verify critical files exist
|
||||||
|
|||||||
Reference in New Issue
Block a user