If you have a problems after a deployment, you can rollback to the previous version of the app.
-
SSH into the server.
-
Check the docker images to see the previous version of the app:
docker images torrust/tracker REPOSITORY TAG IMAGE ID CREATED SIZE torrust/tracker develop b081a7499542 19 minutes ago 133MB torrust/tracker <none> 7dbdad453cf3 6 hours ago 133MB
-
Tag the previous version of the app with a new name (e.g.
rollback):docker tag 7dbdad453cf3 torrust/tracker:rollbackThis command tags the image with ID
7dbdad453cf3astorrust/tracker:rollback.docker images torrust/tracker REPOSITORY TAG IMAGE ID CREATED SIZE torrust/tracker develop b081a7499542 21 minutes ago 133MB torrust/tracker rollback 7dbdad453cf3 6 hours ago 133MB
The
rollbacktag now points to the previous version of the app. -
Edit the
compose.yamlfile to use the new tag:Change the line:
image: torrust/tracker:develop
to:
image: torrust/tracker:rollback
-
Run the following command to start the previous version of the app:
docker compose up --build --detach -
Check the logs of the tracker container to see if everything is working:
./share/bin/tracker-filtered-logs.sh