Add app:infra:snapshot command, page reads from var/infra.json
The /admin/infra page was slow because Docker stats API blocks per container. Now a cron (every 5min) generates var/infra.json via app:infra:snapshot, and the page reads the static JSON file instantly. Mount Docker socket in cron container for snapshot access. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -228,6 +228,13 @@
|
||||
job: "docker compose -f /var/www/e-ticket/docker-compose-prod.yml exec -T php php bin/console app:stripe:sync --env=prod >> /var/log/e-ticket-stripe-sync.log 2>&1"
|
||||
user: bot
|
||||
|
||||
- name: Configure infra snapshot cron (every 5 minutes)
|
||||
cron:
|
||||
name: "e-ticket infra snapshot"
|
||||
minute: "*/5"
|
||||
job: "docker compose -f /var/www/e-ticket/docker-compose-prod.yml exec -T php php bin/console app:infra:snapshot --env=prod >> /var/log/e-ticket-infra.log 2>&1"
|
||||
user: bot
|
||||
|
||||
post_tasks:
|
||||
- name: Disable maintenance mode
|
||||
command: make maintenance_off
|
||||
|
||||
Reference in New Issue
Block a user