Skip to content

Rollback

Rollback coerente richiede allineamento tra immagine Docker, database e file site.

Quando eseguire

  • Health check fallito post-deploy
  • Errori migrazione bench migrate
  • Regressioni funzionali in staging/production

Procedura

1. Immagine

Staging: redeploy tag precedente su Dokploy.

Production: usare digest precedente validato (nessun rebuild):

ghcr.io/<org>/ez-factoryos@sha256:<previous-digest>

2. Database e file

bash
BACKUP_ID=<pre-deploy-timestamp> bash scripts/restore.sh

Per server remoto: eseguire restore con COMPOSE_FILE e ENV_FILE dell'ambiente target.

3. Verifica

bash
EZ_ENV=staging HEALTH_URL=https://staging.<dominio>/api/method/ping \
  bash scripts/health-check.sh

GitHub Actions

deploy-production.yml invia evento rollback al webhook Dokploy in caso di failure.

Checklist

  • [ ] Backup pre-deploy identificato
  • [ ] Digest immagine precedente noto
  • [ ] Restore DB completato
  • [ ] Restore file site completato
  • [ ] Health check OK
  • [ ] Migrazioni coerenti con versione immagine

Documentazione Ez FactoryOS — Ortobellina / EzBit