Rollback a previous version of your application
You may need to rollback a previous version of your code after deploying a build containing bugs or incorrect behavior.
A few warnings
If the new version of your code applied data migrations in your database, some of them might be breaking the previous versions of your app. Thus, rolling back to one of those previous versions would only create more problems. In that case, it is probably more efficient to write down the required code to fix what is not working correctly in your app, with the new data in mind.
By Git
The easiest method to rollback your code is to git push
the commit you need to restore.
To know which commit is currently running, have a look at the last successful
deployment of your app on the dashboard, you can also get
commit information with the command git log
.
If the faulty commit is c0d7a61
, and you know that the commit 40b63a6
was working,
you can push this commit again with the following command line:
git push scalingo 40b63a6:master --force
This command will push the working commit on the Scalingo master
branch, and as a result,
trigger the deployment of this previous version 40b63a6
. The deployment will be running
as usually and replace the running app in case of success.
By previous Build/Release
Rolling back to a previous Build/Release, i.e. a precise Docker image built previously by our platform, is not publicly available yet. Reach Scalingo Support Team from the in-app conversation app, or by email at support@scalingo.com