first commit

This commit is contained in:
Saufi
2026-06-24 20:32:14 +08:00
commit 10fb30ad69
201 changed files with 21356 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
opcache.enable = 0
opcache.enable_cli = 0

61
docker/php/php.ini Normal file
View File

@@ -0,0 +1,61 @@
; ─────────────────────────────────────────────────────────────
; MBIP Pusat Data — PHP 8.4 Custom Configuration
; Digunakan untuk CLI dan FPM
; ─────────────────────────────────────────────────────────────
[PHP]
; ── Zon masa ─────────────────────────────────────────────────
date.timezone = Asia/Kuala_Lumpur
; ── Memori ───────────────────────────────────────────────────
memory_limit = 256M
max_execution_time = 300
max_input_time = 300
max_input_vars = 5000
default_socket_timeout = 60
; ── Had muat naik (laporan PDF, maks ~20MB) ──────────────────
file_uploads = On
upload_max_filesize = 25M
post_max_size = 30M
max_file_uploads = 10
; ── Pelaporan ralat (produksi — log sahaja) ──────────────────
display_errors = Off
display_startup_errors = Off
log_errors = On
error_log = /var/www/html/storage/logs/php_errors.log
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; ── Keselamatan ──────────────────────────────────────────────
expose_php = Off
allow_url_fopen = Off
allow_url_include = Off
session.use_strict_mode = 1
session.cookie_httponly = 1
session.cookie_samesite = "Lax"
; ── Output buffering ─────────────────────────────────────────
output_buffering = 4096
; ── OPcache ──────────────────────────────────────────────────
[opcache]
opcache.enable = 1
opcache.enable_cli = 1
opcache.memory_consumption = 128
opcache.interned_strings_buffer = 16
opcache.max_accelerated_files = 20000
opcache.validate_timestamps = 1
opcache.revalidate_freq = 0
opcache.save_comments = 1
opcache.fast_shutdown = 1
opcache.jit_buffer_size = 64M
opcache.jit = tracing
; ── Realpath cache ───────────────────────────────────────────
realpath_cache_size = 4096K
realpath_cache_ttl = 600
; ── MySQLi / PDO ─────────────────────────────────────────────
[MySQLi]
mysqli.default_port = 3306

44
docker/php/www.conf Normal file
View File

@@ -0,0 +1,44 @@
; ─────────────────────────────────────────────────────────────
; PHP-FPM Pool Configuration — MBIP Pusat Data Production
; ─────────────────────────────────────────────────────────────
[www]
; ── Pemilik proses ───────────────────────────────────────────
user = www-data
group = www-data
; ── Dengar pada TCP (Nginx sambung melalui nama servis "app") ─
listen = 0.0.0.0:9000
; ── Pengurus proses ──────────────────────────────────────────
pm = dynamic
; (RAM - overhead OS) / ~20MB setiap proses PHP
pm.max_children = 20
pm.start_servers = 5
pm.min_spare_servers = 5
pm.max_spare_servers = 10
; Kitar semula worker untuk elak memory leak
pm.max_requests = 500
; ── Log permintaan lambat ─────────────────────────────────────
slowlog = /var/log/php-fpm/slow.log
request_slowlog_timeout = 10s
request_terminate_timeout = 300s
; ── Logging ───────────────────────────────────────────────────
access.log = /var/log/php-fpm/access.log
access.format = "%R - %u %t \"%m %r%Q%q\" %s %f %{mili}d %{kilo}M %C%%"
catch_workers_output = yes
decorate_workers_output = no
; ── Keselamatan ──────────────────────────────────────────────
clear_env = no
; ── Health check ─────────────────────────────────────────────
ping.path = /ping
ping.response = pong
pm.status_path = /fpm-status