fix: dockerfile

This commit is contained in:
u00lipp committed 2025-10-23 07:58:06 +02:00
1 parent 6793c9196c
commit 28ed738e33
4 files changed
+161 -173

No files matched your search

+48
View File
@@ -0,0 +1,48 @@
server {
listen 80 default_server;
server_name _;
root /var/www/html/public;
index index.php;
# Healthcheck
location = /healthz { return 200 "ok\n"; add_header Content-Type text/plain; }
# Static
location ~* \.(?:css|js|mjs|map|jpg|jpeg|png|gif|ico|svg|webp|avif|ttf|otf|woff|woff2)$ {
access_log off; log_not_found off;
expires 7d;
add_header Cache-Control "public, max-age=604800, immutable";
try_files $uri =404;
}
# Front controller
location / {
try_files $uri $uri/ /index.php?$query_string;
}
# PHP via unix socket
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
fastcgi_read_timeout 60s;
fastcgi_buffering on;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
}
client_max_body_size 64m;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "strict-origin-when-cross-origin" always;
gzip on;
gzip_comp_level 5;
gzip_min_length 256;
gzip_proxied any;
gzip_types text/plain text/css application/json application/javascript application/xml+rss application/xml application/x-font-ttf font/opentype image/svg+xml;
}
+21
View File
@@ -0,0 +1,21 @@
[supervisord]
nodaemon=true
logfile=/var/log/supervisor/supervisord.log
[program:php-fpm]
command=/usr/local/sbin/php-fpm -F
autorestart=true
priority=10
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
autorestart=true
priority=20
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
stderr_logfile=/dev/stderr
stderr_logfile_maxbytes=0