diff --git a/Dockerfile b/Dockerfile index 418f250..fc01642 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,10 +32,17 @@ WORKDIR /var/www/html # Copy existing application directory contents 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 \ - && chmod -R 755 /var/www/html/storage \ - && chmod -R 755 /var/www/html/bootstrap/cache + && chmod -R 775 /var/www/html/storage \ + && chmod -R 775 /var/www/html/bootstrap/cache # Create .env file if it doesn't exist RUN if [ ! -f .env ]; then cp .env.example .env; fi