Clear Symfony + Redis cache before migrations in deploy
Prevents stale Doctrine L2 cache and app cache from causing issues after schema changes. Clears both filesystem cache and Redis pool. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -128,12 +128,22 @@
|
||||
args:
|
||||
chdir: /var/www/e-ticket
|
||||
|
||||
- name: Clear Symfony cache before migration
|
||||
command: docker compose -f docker-compose-prod.yml exec -T php php bin/console cache:clear --env=prod
|
||||
args:
|
||||
chdir: /var/www/e-ticket
|
||||
|
||||
- name: Clear Redis cache pool (Doctrine L2 + app cache)
|
||||
command: docker compose -f docker-compose-prod.yml exec -T php php bin/console cache:pool:clear cache.app --env=prod
|
||||
args:
|
||||
chdir: /var/www/e-ticket
|
||||
|
||||
- name: Run migrations
|
||||
command: make migrate_prod
|
||||
args:
|
||||
chdir: /var/www/e-ticket
|
||||
|
||||
- name: Clear cache
|
||||
- name: Clear cache after migration
|
||||
command: make clear_prod
|
||||
args:
|
||||
chdir: /var/www/e-ticket
|
||||
|
||||
Reference in New Issue
Block a user