@@ -49,26 +49,26 @@ section.
49
49
3 . Verify that your updated ` docker-compose.yml ` points to the desired image version,
50
50
e.g.:
51
51
52
- ``` yml
53
- zulip :
54
- image : " zulip/docker-zulip:2.0.1-0"
55
- ` ` `
52
+ ``` yaml
53
+ zulip :
54
+ image : " zulip/docker-zulip:2.0.1-0"
55
+ ` ` `
56
56
57
57
4. You can execute the upgrade by running:
58
58
59
- ` ` `
60
- # Stops the old zulip container; this begins your downtime
61
- docker-compose stop
62
- # Boots the new zulip container; this ends your downtime
63
- docker-compose up
64
- # Deletes the old container images
65
- docker-compose rm
66
- ```
59
+ ` ` ` shell
60
+ # Stops the old zulip container; this begins your downtime
61
+ docker-compose stop
62
+ # Boots the new zulip container; this ends your downtime
63
+ docker-compose up
64
+ # Deletes the old container images
65
+ docker-compose rm
66
+ ```
67
67
68
68
That's it! Zulip is now running the updated version.
69
69
You can confirm you're running the latest version by running:
70
70
71
- ``` bash
71
+ ``` shell
72
72
docker-compose exec -u zulip zulip cat /home/zulip/deployments/current/version.py
73
73
```
74
74
@@ -78,21 +78,20 @@ docker-compose exec -u zulip zulip cat /home/zulip/deployments/current/version.p
78
78
specify the Git commit you'd like to build the zulip container from.
79
79
E.g.:
80
80
81
- ```
82
- zulip:
83
- # image: "zulip/docker-zulip:2.0.1-0"
84
- build:
85
- context: .
86
- args:
87
- # Change these if you want to build zulip from a different repo/branch
88
- ZULIP_GIT_URL: https://github.com/zulip/zulip.git
89
- ZULIP_GIT_REF: master
90
- ```
91
-
92
- You can set ` ZULIP_GIT_URL ` to any clone of the zulip/zulip git
93
- repository, and ` ZULIP_GIT_REF ` to be any ref name in that repository
94
- (e.g. ` master ` or ` 1.9.0 ` or
95
- ` 445932cc8613c77ced023125248c8b966b3b7528 ` ).
81
+ ``` yaml
82
+ zulip :
83
+ # image: "zulip/docker-zulip:2.0.1-0"
84
+ build :
85
+ context : .
86
+ args :
87
+ # Change these if you want to build zulip from a different repo/branch
88
+ ZULIP_GIT_URL : https://github.com/zulip/zulip.git
89
+ ZULIP_GIT_REF : master
90
+ ` ` `
91
+
92
+ You can set ` ZULIP_GIT_URL` to any clone of the zulip/zulip git repository,
93
+ and `ZULIP_GIT_REF` to be any ref name in that repository (e.g. `master` or
94
+ ` 1.9.0` or `445932cc8613c77ced023125248c8b966b3b7528`).
96
95
97
96
2. Run `docker-compose build zulip` to build a Zulip Docker image from
98
97
the specified Git version.
@@ -133,53 +132,53 @@ occurences of `/opt/docker/zulip/postgresql/data` with your path.
133
132
134
133
3. Create a new (upgraded) Postgres container using a different data directory :
135
134
136
- ```
137
- docker run -d \
138
- --name postgresnew \
139
- -e POSTGRES_DB=zulip \
140
- -e POSTGRES_USER=zulip \
141
- -e POSTGRES_PASSWORD=zulip \
142
- -v /opt/docker/zulip/postgresql/new:/var/lib/postgresql/data:rw \
143
- zulip/zulip-postgresql:latest
144
- ```
135
+ ` ` ` shell
136
+ docker run -d \
137
+ --name postgresnew \
138
+ -e POSTGRES_DB=zulip \
139
+ -e POSTGRES_USER=zulip \
140
+ -e POSTGRES_PASSWORD=zulip \
141
+ -v /opt/docker/zulip/postgresql/new:/var/lib/postgresql/data:rw \
142
+ zulip/zulip-postgresql:latest
143
+ ` ` `
145
144
146
145
4. Use `pg_dumpall` to dump all data from the existing Postgres container to
147
146
the new Postgres container :
148
147
149
- ```
150
- docker-compose exec database pg_dumpall -U postgres | \
151
- docker exec -i postgresnew psql -U postgres
152
- ```
148
+ ` ` ` shell
149
+ docker-compose exec database pg_dumpall -U postgres | \
150
+ docker exec -i postgresnew psql -U postgres
151
+ ` ` `
153
152
154
153
5. Stop and remove both Postgres containers :
155
154
156
- ```
157
- docker-compose rm --stop database
158
- docker rm --stop postgresnew
159
- ```
155
+ ` ` ` shell
156
+ docker-compose rm --stop database
157
+ docker rm --stop postgresnew
158
+ ` ` `
160
159
161
160
6. Edit your `docker-compose.yml` to use the
162
161
` zulip/zulip-postgresql:latest` image for the `database` container
163
162
(this is the default in `zulip/docker-zulip`).
164
163
165
164
7. Replace the old Postgres data directory with upgraded data directory :
166
165
167
- ```
168
- mv /opt/docker/zulip/postgresql/data /opt/docker/zulip/postgresql/old
169
- mv /opt/docker/zulip/postgresql/new /opt/docker/zulip/postgresql/data
170
- ```
166
+ ` ` ` shell
167
+ mv /opt/docker/zulip/postgresql/data /opt/docker/zulip/postgresql/old
168
+ mv /opt/docker/zulip/postgresql/new /opt/docker/zulip/postgresql/data
169
+ ` ` `
171
170
172
171
8. Delete the old existing containers :
173
172
174
- ```
175
- docker-compose rm
176
- ```
173
+ ` ` ` shell
174
+ docker-compose rm
175
+ ` ` `
177
176
178
177
9. Start Zulip up again :
179
178
180
- ```
181
- docker-compose up
182
- ```
179
+ ` ` ` shell
180
+ docker-compose up
181
+ ` ` `
183
182
184
183
That should be it. Your Postgres data has now been updated to use the
185
184
` zulip/zulip-postgresql` image.
0 commit comments