Every deployment of an application keeps the image it built and the deployment settings it ran with. Rolling back redeploys the application from one of those earlier deployments.

Rolling back

Open the application, go to its Deployments list and choose Rollback on the deployment you want to return to. Miget redeploys the application using the image from that deployment. Over the API, list the deployments and roll back to one of them:

What a rollback restores

A rollback puts back the image and the deployment settings of the deployment you picked, then deploys the application again. It does not roll back your data. Databases, buckets, volumes and other add-ons keep their current state, so a deploy that ran a migration is not undone by rolling back the code.

Which deployments can be rolled back

The Rollback action appears only on deployments that can be rolled back. A deployment can be rolled back when:
  • it has a stored image to redeploy,
  • it used the same deployment method the application uses now - after switching an application from, say, Git push to a container registry, deployments made the old way cannot be rolled back until you switch back,
  • it is not the deployment that is currently running, and
  • it did not fail.
A suspended workspace cannot deploy, so it cannot roll back either.
A static site has no image. Rolling one back rebuilds and republishes the commit that deployment shipped, which works only for a site connected to GitHub.