From 014a1f44088a2d4506b8816ea03e33ff5e4041b9 Mon Sep 17 00:00:00 2001 From: Julien Nahum Date: Fri, 23 May 2025 20:40:56 +0200 Subject: [PATCH] Enhance Application Optimization in Docker Entrypoint - Added a cache clearing step in the `optimize_application` function of the `php-fpm-entrypoint` script. This new line executes `php ./artisan optimize:clear` before optimizing the application, ensuring that any stale cache is removed, which can lead to improved performance and reliability during application optimization. This change aims to enhance the application's responsiveness by ensuring that the optimization process starts with a clean state, thereby reducing potential issues related to outdated cached data. --- docker/php-fpm-entrypoint | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/php-fpm-entrypoint b/docker/php-fpm-entrypoint index 6feb2940..4fc7e7ff 100644 --- a/docker/php-fpm-entrypoint +++ b/docker/php-fpm-entrypoint @@ -131,6 +131,9 @@ run_init_project() { } optimize_application() { + echo "Clearing application cache" + php ./artisan optimize:clear + echo "Optimizing application" php ./artisan optimize }