fix: permissions

This commit is contained in:
u00lipp
2025-10-27 12:09:32 +01:00
parent 97a144baaa
commit a207b01c12
3 changed files with 16 additions and 11 deletions
+8 -2
View File
@@ -53,8 +53,14 @@
# Permissions for Laravel writable directories # Permissions for Laravel writable directories
RUN mkdir -p storage bootstrap/cache \ RUN mkdir -p storage bootstrap/cache \
&& chown -R nginx:nginx storage bootstrap/cache \ && chown -R nginx:nginx storage bootstrap/cache \
&& chmod -R ug+rwX storage bootstrap/cache && chmod -R ug+rwX storage bootstrap/cache
# Create Nginx error log file with correct permissions
RUN mkdir -p /var/log/nginx \
&& touch /var/log/nginx/error.log \
&& chown -R nginx:nginx /var/log/nginx \
&& chown -R nginx:nginx /var/log/php82 \
&& chmod -R 664 /var/log/nginx/error.log
# Build frontend assets # Build frontend assets
RUN npm ci && npm run build RUN npm ci && npm run build
+8 -7
View File
@@ -1,7 +1,9 @@
user nginx; user nginx;
worker_processes auto; worker_processes auto;
error_log /var/log/nginx/error.log warn;
pid /run/nginx.pid; # Send logs to container fds (works regardless of privileges)
error_log /proc/self/fd/2 warn;
pid /run/nginx/nginx.pid;
events { events {
worker_connections 1024; worker_connections 1024;
@@ -15,14 +17,13 @@ http {
'$status $body_bytes_sent "$http_referer" ' '$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; '"$http_user_agent" "$http_x_forwarded_for"';
access_log /dev/stdout main; access_log /proc/self/fd/1 main;
error_log /dev/stderr warn; # (No extra error_log here; the top-level one above is enough)
sendfile on; sendfile on;
keepalive_timeout 65; keepalive_timeout 65;
# Server Blöcke sind NICHT hier! # Include vhosts (your Laravel server block lives in one of these)
# Stattdessen in:
include /etc/nginx/conf.d/*.conf; include /etc/nginx/conf.d/*.conf;
include /etc/nginx/http.d/*.conf; include /etc/nginx/http.d/*.conf;
} }
-2
View File
@@ -13,7 +13,6 @@ stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2 stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
user=nginx
[program:nginx] [program:nginx]
command=/usr/sbin/nginx -g 'daemon off;' command=/usr/sbin/nginx -g 'daemon off;'
@@ -25,4 +24,3 @@ stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0 stdout_logfile_maxbytes=0
stderr_logfile=/dev/fd/2 stderr_logfile=/dev/fd/2
stderr_logfile_maxbytes=0 stderr_logfile_maxbytes=0
user=nginx