fix: clear Symfony cache before container restart on deploy
All checks were successful
Deploy / deploy (push) Successful in 3m21s
All checks were successful
Deploy / deploy (push) Successful in 3m21s
The var/ directory is a persistent Docker volume. Without explicit cache:clear, docker restart keeps serving old cached routes (e.g. / → MangaController). New code is already visible via bind mount before restart, so docker exec works. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
c085c3453a
commit
f418b36167
@@ -45,8 +45,11 @@ task('webpack_encore:build', function () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Restart Docker containers (entrypoint gère les migrations automatiquement)
|
// Restart Docker containers (entrypoint gère les migrations automatiquement)
|
||||||
|
// cache:clear avant restart : le nouveau code est déjà visible via bind mount,
|
||||||
|
// mais var/ est un volume Docker persistant qui garde l'ancien cache Symfony.
|
||||||
desc('Restart Docker containers');
|
desc('Restart Docker containers');
|
||||||
task('docker:restart', function () {
|
task('docker:restart', function () {
|
||||||
|
run('docker exec mangarr php bin/console cache:clear --env=prod');
|
||||||
run('docker restart mangarr-worker-commands mangarr-worker-events mangarr-worker-scheduler');
|
run('docker restart mangarr-worker-commands mangarr-worker-events mangarr-worker-scheduler');
|
||||||
run('docker restart mangarr');
|
run('docker restart mangarr');
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user