prod ready ?

This commit is contained in:
Loic Masi
2026-08-07 16:19:14 +02:00
parent 5fbf76868f
commit 57bd8da5c8
22 changed files with 1503 additions and 4780 deletions

55
docker/nginx/default.conf Normal file
View File

@@ -0,0 +1,55 @@
server {
listen 80;
server_name _;
root /var/www/html;
index index.php;
charset utf-8;
client_max_body_size 64M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param HTTP_PROXY "";
fastcgi_read_timeout 120s;
}
# Les classes, modèles et fichiers SQL ne doivent jamais être servis directement.
location ^~ /app/ {
deny all;
return 404;
}
location ^~ /database/ {
deny all;
return 404;
}
location ~* ^/(config\.php|db\.php|page_bootstrap\.php|README[^/]*)$ {
deny all;
return 404;
}
location ~ /\. {
deny all;
return 404;
}
location ~* \.(?:css|js|png|jpg|jpeg|gif|svg|ico|webp)$ {
expires 7d;
add_header Cache-Control "public, max-age=604800";
try_files $uri =404;
}
}