Skip to content

Commit d17d4d8

Browse files
committed
UPGRADING: Indent and set langauges on code blocks.
1 parent 16ed345 commit d17d4d8

File tree

1 file changed

+54
-55
lines changed

1 file changed

+54
-55
lines changed

UPGRADING.md

Lines changed: 54 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -49,26 +49,26 @@ section.
4949
3. Verify that your updated `docker-compose.yml` points to the desired image version,
5050
e.g.:
5151

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+
```
5656
5757
4. You can execute the upgrade by running:
5858
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+
```
6767

6868
That's it! Zulip is now running the updated version.
6969
You can confirm you're running the latest version by running:
7070

71-
```bash
71+
```shell
7272
docker-compose exec -u zulip zulip cat /home/zulip/deployments/current/version.py
7373
```
7474

@@ -78,21 +78,20 @@ docker-compose exec -u zulip zulip cat /home/zulip/deployments/current/version.p
7878
specify the Git commit you'd like to build the zulip container from.
7979
E.g.:
8080

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`).
9695

9796
2. Run `docker-compose build zulip` to build a Zulip Docker image from
9897
the specified Git version.
@@ -133,53 +132,53 @@ occurences of `/opt/docker/zulip/postgresql/data` with your path.
133132

134133
3. Create a new (upgraded) Postgres container using a different data directory:
135134

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+
```
145144

146145
4. Use `pg_dumpall` to dump all data from the existing Postgres container to
147146
the new Postgres container:
148147

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+
```
153152

154153
5. Stop and remove both Postgres containers:
155154

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+
```
160159

161160
6. Edit your `docker-compose.yml` to use the
162161
`zulip/zulip-postgresql:latest` image for the `database` container
163162
(this is the default in `zulip/docker-zulip`).
164163

165164
7. Replace the old Postgres data directory with upgraded data directory:
166165

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+
```
171170

172171
8. Delete the old existing containers:
173172

174-
```
175-
docker-compose rm
176-
```
173+
```shell
174+
docker-compose rm
175+
```
177176

178177
9. Start Zulip up again:
179178

180-
```
181-
docker-compose up
182-
```
179+
```shell
180+
docker-compose up
181+
```
183182

184183
That should be it. Your Postgres data has now been updated to use the
185184
`zulip/zulip-postgresql` image.

0 commit comments

Comments
 (0)