Skip to content

Deploy Staging ​

Scopo ​

Promuovere codice validato da dev a staging e verificare l’ambiente cliente.

Prerequisiti ​

  • PR dev → staging con CI verde.
  • Secrets: BACKUP_WEBHOOK_STAGING (URL Control /api/webhooks/backup/staging?token=…), DOKPLOY_WEBHOOK_STAGING, COOLIFY_DEPLOY_TOKEN.
  • Node-RED staging opzionale ma consigliato per test macchine.

Trigger ​

Merge PR su staging → build-image.yml (test + push GHCR) → deploy-staging.yml.

Procedura automatica ​

  1. Backup pre-deploy (webhook obbligatorio).
  2. Deploy immagine ghcr.io/<org>/ez-factoryos:sha-<commit> / :staging.
  3. configurator esegue bench migrate.
  4. Health check (scripts/health-check.sh).
  5. Applicare scripts/staging-safety.sh se non già eseguito.

Procedura manuale (server) ​

bash
docker compose -f deploy/compose/staging.yml --env-file deploy/env/.env.staging pull
docker compose -f deploy/compose/staging.yml --env-file deploy/env/.env.staging up -d
docker compose -f deploy/compose/staging.yml --env-file deploy/env/.env.staging exec backend \
  bash -lc 'cd /home/frappe/frappe-bench && bench --site <site> migrate'
bash scripts/staging-safety.sh
bash scripts/health-check.sh

Su Coolify: usare i manifest coolify.staging.yml generati.

Verifica ​

bash
curl -fsS https://staging-factoryos.ezbit.it/api/method/ping
# mute_emails=1; Business Cube URL vuoto; OT writes off

Smoke Desk: login, Work Order, Machine Connection Profile.

Rollback ​

Vedi infrastructure/rollback.

Ez FactoryOS — MES per Ortobellina / OP Raggio di Sole · App Frappe v16 ez_factoryos