What to back up
PostgreSQL is the source of truth for projects, keywords, schedules, rank checks, encrypted provider connections, alerts, notifications, and audit history. Keep:- regular PostgreSQL backups with tested restore procedures;
- the exact
BISIBILITY_SECRETS_KEYused to encrypt provider credentials; BETTER_AUTH_SECRETand the deployment’s secret/environment inventory;- your deployment manifests and the application version or image digest.
--clean is destructive and must never
target the active production database.
Upgrade Docker Compose
- Read the changelog and note schema or environment changes.
- Stop writes or schedule a maintenance window.
- Back up PostgreSQL and secrets.
-
Fetch the target tag, review
.env.example, and update.envdeliberately. -
Rebuild and start:
migrate service runs prisma migrate deploy before the web app.
With scheduled checks enabled, include --profile scheduled when starting the
stack. Never enable demo OTP or demo seeding on a real deployment.
After an upgrade that adds competitor organic snapshots, optionally compact the
latest completed SERP for each keyword into the new query-friendly column:
DATABASE_URL available. It is batched and idempotent, and
leaves checks without a usable historical organic payload unchanged. The app
continues to read those legacy payloads directly, so the backfill does not need
to block the web deployment.
Keep web and worker on the same version
The web app and Temporal worker share one Prisma schema. For a split deployment, back up PostgreSQL, deploy the web app so it runsprisma migrate deploy, and
then immediately deploy the worker from the same release tag. Version skew
commonly appears as “The column … does not exist” errors in worker logs or as
failing scheduled checks while the web app works.
Verify and roll back
CheckGET /api/v1/health, sign-in, one project read, and worker logs. Confirm
the Temporal worker reports ready and its maintenance schedules are created or
already exist. For split deployments, verify that both processes use the same
release by following Keep web and worker on the same version.
Rolling the application image back does not reverse Prisma migrations. If a
release contains an incompatible schema migration, restore the pre-upgrade
database backup together with the matching application version. Practice that
procedure before relying on it during an incident.
For managed platforms, use the platform database backup and rollback features,
but keep independent exports for disaster recovery. Deployment topology is in
Self-hosting.