Fix nginx temp directory permissions in Dockerfile
- Create nginx temp directories during build - Set proper ownership (www-data) and permissions (775) - Fixes 'Permission denied' error on PDF uploads
This commit is contained in:
parent
b2b061b57a
commit
a81f26ce88
1 changed files with 9 additions and 2 deletions
11
Dockerfile
11
Dockerfile
|
|
@ -55,9 +55,16 @@ RUN composer dump-autoload --optimize
|
||||||
# Create log directory for supervisor
|
# Create log directory for supervisor
|
||||||
RUN mkdir -p /var/log/supervisor
|
RUN mkdir -p /var/log/supervisor
|
||||||
|
|
||||||
|
# Create nginx temp directories and set permissions
|
||||||
|
RUN mkdir -p /var/lib/nginx/tmp/client_body \
|
||||||
|
/var/lib/nginx/tmp/proxy \
|
||||||
|
/var/lib/nginx/tmp/fastcgi \
|
||||||
|
/var/lib/nginx/tmp/uwsgi \
|
||||||
|
/var/lib/nginx/tmp/scgi
|
||||||
|
|
||||||
# Set permissions
|
# Set permissions
|
||||||
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache
|
RUN chown -R www-data:www-data /var/www/html/storage /var/www/html/bootstrap/cache /var/lib/nginx/tmp
|
||||||
RUN chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache
|
RUN chmod -R 775 /var/www/html/storage /var/www/html/bootstrap/cache /var/lib/nginx/tmp
|
||||||
|
|
||||||
# Copy nginx configuration
|
# Copy nginx configuration
|
||||||
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
COPY docker/nginx.conf /etc/nginx/nginx.conf
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue