Fix: Create storage directories and set proper permissions
All checks were successful
Deploy Development / deploy (push) Successful in 2m18s

This commit is contained in:
Frank John Begornia
2025-12-18 12:14:14 +08:00
parent 2550a945a3
commit 110c0f7291

View File

@@ -32,10 +32,17 @@ WORKDIR /var/www/html
# Copy existing application directory contents # Copy existing application directory contents
COPY . /var/www/html COPY . /var/www/html
# Copy existing application directory permissions # Create storage directories and set permissions
RUN mkdir -p storage/framework/views \
storage/framework/cache \
storage/framework/sessions \
storage/logs \
bootstrap/cache
# Set proper ownership and permissions
RUN chown -R www-data:www-data /var/www/html \ RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html/storage \ && chmod -R 775 /var/www/html/storage \
&& chmod -R 755 /var/www/html/bootstrap/cache && chmod -R 775 /var/www/html/bootstrap/cache
# Create .env file if it doesn't exist # Create .env file if it doesn't exist
RUN if [ ! -f .env ]; then cp .env.example .env; fi RUN if [ ! -f .env ]; then cp .env.example .env; fi