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:
parent
591d21d888
commit
014a1f4408
|
|
@ -131,6 +131,9 @@ run_init_project() {
|
||||||
}
|
}
|
||||||
|
|
||||||
optimize_application() {
|
optimize_application() {
|
||||||
|
echo "Clearing application cache"
|
||||||
|
php ./artisan optimize:clear
|
||||||
|
|
||||||
echo "Optimizing application"
|
echo "Optimizing application"
|
||||||
php ./artisan optimize
|
php ./artisan optimize
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue