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.
This commit is contained in:
Julien Nahum 2025-05-23 20:40:56 +02:00
parent 591d21d888
commit 014a1f4408
1 changed files with 3 additions and 0 deletions

View File

@ -131,6 +131,9 @@ run_init_project() {
}
optimize_application() {
echo "Clearing application cache"
php ./artisan optimize:clear
echo "Optimizing application"
php ./artisan optimize
}