prod ready ?
This commit is contained in:
55
docker/nginx/default.conf
Normal file
55
docker/nginx/default.conf
Normal 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;
|
||||
}
|
||||
}
|
||||
24
docker/php/php.ini
Normal file
24
docker/php/php.ini
Normal file
@@ -0,0 +1,24 @@
|
||||
date.timezone = Europe/Paris
|
||||
memory_limit = 256M
|
||||
max_execution_time = 120
|
||||
max_input_time = 120
|
||||
post_max_size = 64M
|
||||
upload_max_filesize = 64M
|
||||
|
||||
session.cookie_httponly = 1
|
||||
session.cookie_samesite = Lax
|
||||
session.use_strict_mode = 1
|
||||
|
||||
expose_php = Off
|
||||
|
||||
display_errors = Off
|
||||
display_startup_errors = Off
|
||||
log_errors = On
|
||||
error_reporting = E_ALL
|
||||
|
||||
opcache.enable = 1
|
||||
opcache.enable_cli = 0
|
||||
opcache.memory_consumption = 128
|
||||
opcache.interned_strings_buffer = 16
|
||||
opcache.max_accelerated_files = 10000
|
||||
opcache.validate_timestamps = 0
|
||||
Reference in New Issue
Block a user