|
1 | 1 | # Rollbacks |
2 | 2 |
|
3 | | -If you have a problems after a [deployment](deployment.md), you can rollback to the previous version of the app. |
| 3 | +If you have a problems after a [deployment](deployment.md), you can rollback |
| 4 | +to the previous version of the app. |
4 | 5 |
|
5 | 6 | 1. SSH into the server. |
6 | 7 |
|
7 | 8 | 2. Check the docker images to see the previous version of the app: |
8 | 9 |
|
9 | | - ```console |
10 | | - docker images torrust/tracker |
11 | | - REPOSITORY TAG IMAGE ID CREATED SIZE |
12 | | - torrust/tracker develop b081a7499542 19 minutes ago 133MB |
13 | | - torrust/tracker <none> 7dbdad453cf3 6 hours ago 133MB |
14 | | - ``` |
| 10 | + ```console |
| 11 | + docker images torrust/tracker |
| 12 | + REPOSITORY TAG IMAGE ID CREATED SIZE |
| 13 | + torrust/tracker develop b081a7499542 19 minutes ago 133MB |
| 14 | + torrust/tracker <none> 7dbdad453cf3 6 hours ago 133MB |
| 15 | + ``` |
15 | 16 |
|
16 | 17 | 3. Tag the previous version of the app with a new name (e.g. `rollback`): |
17 | 18 |
|
18 | | - ```console |
19 | | - docker tag 7dbdad453cf3 torrust/tracker:rollback |
20 | | - ``` |
| 19 | + ```console |
| 20 | + docker tag 7dbdad453cf3 torrust/tracker:rollback |
| 21 | + ``` |
21 | 22 |
|
22 | | - This command tags the image with ID `7dbdad453cf3` as `torrust/tracker:rollback`. |
| 23 | + This command tags the image with ID `7dbdad453cf3` as `torrust/tracker:rollback`. |
23 | 24 |
|
24 | | - ```console |
25 | | - docker images torrust/tracker |
26 | | - REPOSITORY TAG IMAGE ID CREATED SIZE |
27 | | - torrust/tracker develop b081a7499542 21 minutes ago 133MB |
28 | | - torrust/tracker rollback 7dbdad453cf3 6 hours ago 133MB |
29 | | - ``` |
| 25 | + ```console |
| 26 | + docker images torrust/tracker |
| 27 | + REPOSITORY TAG IMAGE ID CREATED SIZE |
| 28 | + torrust/tracker develop b081a7499542 21 minutes ago 133MB |
| 29 | + torrust/tracker rollback 7dbdad453cf3 6 hours ago 133MB |
| 30 | + ``` |
30 | 31 |
|
31 | | - The `rollback` tag now points to the previous version of the app. |
| 32 | + The `rollback` tag now points to the previous version of the app. |
32 | 33 |
|
33 | 34 | 4. Edit the `compose.yaml` file to use the new tag: |
34 | 35 |
|
35 | | - Change the line: |
| 36 | + Change the line: |
36 | 37 |
|
37 | | - ```yaml |
38 | | - image: torrust/tracker:develop |
39 | | - ``` |
| 38 | + ```yaml |
| 39 | + image: torrust/tracker:develop |
| 40 | + ``` |
40 | 41 |
|
41 | | - to: |
| 42 | + to: |
42 | 43 |
|
43 | | - ```yaml |
44 | | - image: torrust/tracker:rollback |
45 | | - ``` |
| 44 | + ```yaml |
| 45 | + image: torrust/tracker:rollback |
| 46 | + ``` |
46 | 47 |
|
47 | 48 | 5. Run the following command to start the previous version of the app: |
48 | 49 |
|
49 | | - ```console |
50 | | - docker compose up --build --detach |
51 | | - ``` |
| 50 | + ```console |
| 51 | + docker compose up --build --detach |
| 52 | + ``` |
52 | 53 |
|
53 | 54 | 6. Check the logs of the tracker container to see if everything is working: |
54 | 55 |
|
55 | | - ```console |
56 | | - ./share/bin/tracker-filtered-logs.sh |
57 | | - ``` |
| 56 | + ```console |
| 57 | + ./share/bin/tracker-filtered-logs.sh |
| 58 | + ``` |
0 commit comments