Rende persistenti i log di produzione e protegge il deploy.

Monta /app/log sul disco video, sposta i cron log sullo stesso path, esclude log/ dal sync rsync e aggiunge pulizia volumi Docker obsoleti.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-13 09:23:42 +02:00
parent b802cf3309
commit 208664848e
9 changed files with 82 additions and 7 deletions

View File

@@ -114,7 +114,8 @@ Watchdog esterno se Rails è completamente giù:
5. Rebuild: `docker compose -f docker-compose.prod.yml up -d --build rails sidekiq`
6. Migrate: `docker compose exec -T rails bundle exec rails db:migrate`
7. Cron: `bash scripts/install_production_cron.sh`
8. Smoke test:
8. (Opzionale) `bash scripts/cleanup_obsolete_volumes.sh` — rimuove volumi Docker migrati
9. Smoke test:
- `curl -sf https://www.matchlivetv.it/up`
- `bundle exec rails ops:health_check` (nel container)
- Apri `/admin/ops`
@@ -130,4 +131,4 @@ Imposta `SENTRY_DSN` dopo `bundle install`. Gli errori creano anche incidenti op
| Nessuna push | Verifica `OPS_NTFY_URL`, test con `ops:test_notify` |
| Troppi alert | Aumenta `OPS_NOTIFY_COOLDOWN_MINUTES`, usa Mute 24h in admin |
| Sidekiq stale | Verifica container `sidekiq` e log Sidekiq |
| Log scanner vuoto | Controlla `/opt/matchlivetv/log/cron-ops.log` |
| Log scanner vuoto | Controlla `${MATCHLIVETV_VIDEOS_ROOT}/log/cron-ops.log` (es. `/media/videos/matchlivetv/log/cron-ops.log`) |