Fix: Create storage directories and set proper permissions
All checks were successful
Deploy Development / deploy (push) Successful in 2m18s
All checks were successful
Deploy Development / deploy (push) Successful in 2m18s
This commit is contained in:
13
Dockerfile
13
Dockerfile
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user