Skip to content

Commit 3ec2386

Browse files
committed
README.md: Run prettier.
1 parent e894ab9 commit 3ec2386

File tree

1 file changed

+69
-63
lines changed

1 file changed

+69
-63
lines changed

README.md

Lines changed: 69 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ This is a container image for running [Zulip](https://zulip.com)
66
([GitHub](https://github.com/zulip/zulip)) in
77
[production][prod-overview]. Image available from:
88

9-
* [**Docker Hub**](https://hub.docker.com/r/zulip/docker-zulip) (`docker pull zulip/docker-zulip:5.7-0`)
9+
- [**Docker Hub**](https://hub.docker.com/r/zulip/docker-zulip) (`docker pull zulip/docker-zulip:5.7-0`)
1010

1111
Current Zulip version: `5.7`
1212
Current Docker image version: `5.7-0`
1313

14-
Project status: **Alpha**. While this project works and is
14+
Project status: **Alpha**. While this project works and is
1515
used by many sites in production, configuring is substantially more
1616
error-prone than the [normal Zulip installer][normal-install] (which
17-
Just Works). We recommend this project if you want to host Zulip
17+
Just Works). We recommend this project if you want to host Zulip
1818
using Docker, but both setting up and maintaining a Zulip server is
1919
simpler and less error-prone with the normal installer than with Docker.
2020

@@ -41,17 +41,17 @@ next section.
4141
### The Docker data storage model
4242

4343
Docker and other container systems are built around shareable
44-
container images. An image is a read-only template with instructions
45-
for creating a container. Often, an image is based on another image,
46-
with a bit of additional customization. For example, Zulip's
44+
container images. An image is a read-only template with instructions
45+
for creating a container. Often, an image is based on another image,
46+
with a bit of additional customization. For example, Zulip's
4747
`zulip-postgresql` image extends the standard `postgresql` image (by
48-
installing a couple `postgres` extensions). And the `zulip` image is
48+
installing a couple `postgres` extensions). And the `zulip` image is
4949
built on top of a standard `ubuntu` image, adding all the code for a Zulip
5050
application/web server.
5151

5252
Every time you boot a container based on a given image, it's like
5353
booting off a CD-ROM: you get the exact same image (and anything
54-
written to the image's filesystem is lost). To handle persistent
54+
written to the image's filesystem is lost). To handle persistent
5555
state that needs to persist after the Docker equivalent of a reboot or
5656
upgrades (like uploaded files or the Zulip database), container
5757
systems let you configure certain directories inside the container
@@ -69,19 +69,19 @@ backed up, to ensure that Zulip's data is backed up.
6969

7070
To use `docker-zulip`, you need the following:
7171

72-
* An installation of [Docker][install-docker] and
72+
- An installation of [Docker][install-docker] and
7373
[Docker Compose][install-docker-compose] or a Kubernetes runtime
7474
engine.
75-
* We [recommend at least 2GB of available RAM][prod-requirements] for
75+
- We [recommend at least 2GB of available RAM][prod-requirements] for
7676
running a production Zulip server; you'll want 4GB if you're
77-
building the container (rather than using the prebuilt images). If
77+
building the container (rather than using the prebuilt images). If
7878
you're just testing and/or aren't expecting a lot of users/messages,
7979
you can get away with significantly less especially for the
8080
`postgres`, `memcached`, etc. containers, because Docker makes it
8181
easy to sharply limit the RAM allocated to the services Zulip
8282
depends on, like redis, memcached, and postgresql (at the cost of
8383
potential performance issues).
84-
* This project doesn't support `docker-rootless`; Zulip needs root
84+
- This project doesn't support `docker-rootless`; Zulip needs root
8585
access to set properties like the maximum number of open file
8686
descriptions via `ulimit` (which is important for it to handle
8787
thousands of connected clients).
@@ -113,62 +113,62 @@ setting environment variables declared in the `zulip -> environment`
113113
section of the `docker-compose.yml` file; this image follows that
114114
convention.
115115

116-
**Mandatory settings**. You must configure these settings (more
116+
**Mandatory settings**. You must configure these settings (more
117117
discussion in the main [Zulip installation docs][install-normal]):
118118

119-
* `SETTING_EXTERNAL_HOST`: The hostname your users will use to
120-
connect to your Zulip server. If you're testing on your laptop,
119+
- `SETTING_EXTERNAL_HOST`: The hostname your users will use to
120+
connect to your Zulip server. If you're testing on your laptop,
121121
the default of `localhost.localdomain` is great.
122-
* `SETTING_ZULIP_ADMINISTRATOR`: The email address to receive error
122+
- `SETTING_ZULIP_ADMINISTRATOR`: The email address to receive error
123123
and support emails generated by the Zulip server and its users.
124124

125-
**Mandatory settings for serious use**. Before you allow
125+
**Mandatory settings for serious use**. Before you allow
126126
production traffic, you need to also set these:
127127

128-
* `POSTGRES_PASSWORD` and `SECRETS_postgres_password` should both be a
128+
- `POSTGRES_PASSWORD` and `SECRETS_postgres_password` should both be a
129129
password for the Zulip container to authenticate to the Postgres
130-
container. Since you won't use this directly, you just want a long,
131-
randomly generated string. While `SECRETS_postgres_password` is
130+
container. Since you won't use this directly, you just want a long,
131+
randomly generated string. While `SECRETS_postgres_password` is
132132
synced to the Zulip container on every boot, `POSTGRES_PASSWORD` is
133133
only accessed by the postgres container on first boot, so if you
134134
later want to change your postgres password after booting the
135135
container, you'll need to either do an
136136
[ALTER ROLE][postgres-alter-role] query inside the `postgres`
137137
container or rebuild the postgres database (only if you don't need
138138
your data!).
139-
* `RABBITMQ_DEFAULT_PASS` and `SECRETS_rabbitmq_password` are similar,
139+
- `RABBITMQ_DEFAULT_PASS` and `SECRETS_rabbitmq_password` are similar,
140140
just for the RabbitMQ container.
141-
* `MEMCACHED_PASSWORD` and `SECRETS_memcached_password` are similar,
141+
- `MEMCACHED_PASSWORD` and `SECRETS_memcached_password` are similar,
142142
just for the memcached container.
143-
* `REDIS_PASSWORD` and `SECRETS_redis_password` are similar, just for
143+
- `REDIS_PASSWORD` and `SECRETS_redis_password` are similar, just for
144144
the Redis container.
145-
* `SECRETS_secret_key` should be a long (e.g. 50 characters), random
146-
string. This value is important to keep secret and constant over
145+
- `SECRETS_secret_key` should be a long (e.g. 50 characters), random
146+
string. This value is important to keep secret and constant over
147147
time, since it is used to (among other things) sign login cookies
148148
(so if you change this, all your users will be forcibly logged out).
149-
* `SETTING_EMAIL_*`: Where you configure Zulip's ability to send
149+
- `SETTING_EMAIL_*`: Where you configure Zulip's ability to send
150150
[outgoing email][outgoing-email].
151151

152152
[postgres-alter-role]: https://www.postgresql.org/docs/9.3/static/sql-alterrole.html
153153

154154
**Other settings**. If an environment variable name doesn't start with
155155
`SETTING` or `SECRETS` in `docker-compose.yml`, it is specific to the
156-
Docker environment. Standard [Zulip server settings][server-settings]
156+
Docker environment. Standard [Zulip server settings][server-settings]
157157
are secrets are set using the following syntax:
158158

159-
* `SETTING_MY_SETTING` will become `MY_SETTING` in
159+
- `SETTING_MY_SETTING` will become `MY_SETTING` in
160160
`/etc/zulip/settings.py`
161-
* `SECRETS_my_secret` will become `my_secret` in
161+
- `SECRETS_my_secret` will become `my_secret` in
162162
`/etc/zulip/zulip-secrets.conf`.
163163

164164
Reading the comments in the sample
165165
[Zulip's settings.py file][prod-settings-template] is the best way to
166166
learn about the full set of Zulip's supported server-level settings.
167167

168168
Most settings in Zulip are just strings, but some are lists (etc.)
169-
which you need to encode in the YAML file. For example,
169+
which you need to encode in the YAML file. For example,
170170

171-
* For `AUTHENTICATION_BACKENDS`, you enter `ZULIP_AUTH_BACKENDS` as a
171+
- For `AUTHENTICATION_BACKENDS`, you enter `ZULIP_AUTH_BACKENDS` as a
172172
comma-separated list of the backend names
173173
(E.g. `"EmailAuthBackend,GitHubAuthBackend"`).
174174

@@ -179,9 +179,9 @@ the multithreaded mode). This algorithm might see the host's memory, not the
179179
docker container's memory. Set to `QUEUE_WORKERS_MULTIPROCESS` to `true` or
180180
`false` to override the automatic calculation.
181181

182-
**SSL Certificates**. By default, the image will generate a self-signed cert.
182+
**SSL Certificates**. By default, the image will generate a self-signed cert.
183183
You can set `SSL_CERTIFICATE_GENERATION: "certbot"` within `docker-compose.yml`
184-
to enable automatically-renewed Let's Encrypt certificates. By using certbot
184+
to enable automatically-renewed Let's Encrypt certificates. By using certbot
185185
here, you are agreeing to the [Let's Encrypt
186186
ToS](https://community.letsencrypt.org/tos).
187187

@@ -203,12 +203,12 @@ The way the environment variables configuration process described in
203203
the last section works is that the `entrypoint.sh` script that runs
204204
when the Docker image starts up will generate a
205205
[Zulip settings.py file][server-settings] file based on your settings
206-
every time you boot the container. This is convenient, in that you
206+
every time you boot the container. This is convenient, in that you
207207
only need to edit the `docker-compose.yml` file to configure your
208208
Zulip server's settings.
209209

210210
An alternative approach is to set `MANUAL_CONFIGURATION: "True"` and
211-
`LINK_SETTINGS_TO_DATA: "True"` in `docker-compose.yml`. If you do that, you
211+
`LINK_SETTINGS_TO_DATA: "True"` in `docker-compose.yml`. If you do that, you
212212
can provide a `settings.py` file and a `zulip-secrets.conf` file in
213213
`/opt/docker/zulip/zulip/settings/etc-zulip/`, and the container will use those.
214214

@@ -221,7 +221,7 @@ docker-compose pull
221221
docker-compose up
222222
```
223223

224-
This will boot the 5 containers declared in `docker-compose.yml`. The
224+
This will boot the 5 containers declared in `docker-compose.yml`. The
225225
`docker-compose` command will print a bunch of output, and then
226226
eventually hang once everything is happily booted, usually ending with
227227
a bunch of lines like this:
@@ -236,7 +236,7 @@ You can inspect what containers are running in another shell with
236236
`docker-compose ps` (remember to `cd` into the `docker-zulip`
237237
directory first).
238238

239-
If you hit `Ctrl-C`, that will stop your Zulip server cluster. If
239+
If you hit `Ctrl-C`, that will stop your Zulip server cluster. If
240240
you'd prefer to have the containers run in the background, you can use
241241
`docker-compose up -d`.
242242

@@ -246,10 +246,10 @@ running `docker-compose build`; see also
246246

247247
### Connecting to your Zulip server
248248

249-
You can now connect to your Zulip server. For example, if you set
249+
You can now connect to your Zulip server. For example, if you set
250250
this up on a laptop with the default port mappings and
251251
`SETTING_EXTERNAL_HOST`, typing `http://localhost/` will take you to
252-
your server. Note that in this default scenario, (1) you'll have to
252+
your server. Note that in this default scenario, (1) you'll have to
253253
proceed past a self-signed SSL error, and (2) you won't be able to
254254
login until you create an organization, but visiting the URL is a good
255255
way to confirm that your networking configuration is working
@@ -304,7 +304,7 @@ A Kubernetes pod file is in the `kubernetes/` folder; you can run it
304304
with `kubectl create -f ./kubernetes/`.
305305

306306
You should read the `docker-compose` section above to understand how
307-
this works, since it's a very similar setup. You'll want to clone
307+
this works, since it's a very similar setup. You'll want to clone
308308
this repository, edit the `zulip-rc.yml` to configure the image, etc.
309309

310310
### Installing minikube for testing
@@ -327,7 +327,7 @@ https://chat.zulip.org/#narrow/stream/21-provision-help/subject/K8.20and.20Helm/
327327

328328
This image is not designed to make it easy to run multiple copies of
329329
the `zulip` application server container (and you need to know a lot
330-
about Zulip to do this sort of thing successfully). If you're
330+
about Zulip to do this sort of thing successfully). If you're
331331
interested in running a high-availablity Zulip installation, your best
332332
bet is to get in touch with the Zulip support team at
333333
@@ -354,9 +354,9 @@ in the Docker environment (`docker-compose.yml`).
354354
## Upgrading the Zulip container
355355

356356
You can upgrade your Zulip installation to any newer version of Zulip
357-
with the following instructions. At a high level, the strategy is to
357+
with the following instructions. At a high level, the strategy is to
358358
download a new image, stop the `zulip` container, and then boot it
359-
back up with the new image. When the upgraded `zulip` container boots
359+
back up with the new image. When the upgraded `zulip` container boots
360360
the first time, it will run the necessary database migrations with
361361
`manage.py migrate`.
362362

@@ -365,7 +365,7 @@ to use `manage.py migrate` to downgrade the database schema manually.
365365

366366
If you are using old `galexrt/docker-zulip` images (from Zulip 1.8.1 or
367367
older), you need to upgrade the postgres image from
368-
`quay.io/galexrt/postgres-zulip-tsearchextras:latest`. Refer to the
368+
`quay.io/galexrt/postgres-zulip-tsearchextras:latest`. Refer to the
369369
[instructions for upgrading from the old galexrt/docker-zulip](#upgrading-from-the-old-galexrtdocker-zulip)
370370
section.
371371

@@ -382,9 +382,8 @@ section.
382382
Note that `docker-zulip` did not support for Zulip's built-in
383383
`restore-backup` tool before Zulip 3.0.
384384

385-
1. Pull the new image version, e.g. for `2.0.8` run: `docker pull
386-
zulip/docker-zulip:2.0.8-0`. We recommend always upgrading to the
387-
latest minor release within a major release series.
385+
1. Pull the new image version, e.g. for `2.0.8` run: `docker pull zulip/docker-zulip:2.0.8-0`. We recommend always upgrading to the
386+
latest minor release within a major release series.
388387

389388
2. Update this project to the corresponding `docker-zulip` version and
390389
resolve any merge conflicts in `docker-compose.yml`.
@@ -394,14 +393,15 @@ latest minor release within a major release series.
394393
the `2.1.2` release).
395394

396395
**Note:** Do not make any changes to the database version or
397-
volume. If there is a difference in database version, leave those
396+
volume. If there is a difference in database version, leave those
398397
unchanged for now, and complete that upgrade separately after the
399398
Zulip upgrade; see [the section below][pg-upgrade].
400399

401400
[pg-upgrade]: #upgrading-zulipzulip-postgresql-to-14
402401

403402
3. Verify that your updated `docker-compose.yml` points to the desired image version,
404-
e.g.:
403+
e.g.:
404+
405405
```yml
406406
zulip:
407407
image: "zulip/docker-zulip:2.0.1-0"
@@ -428,8 +428,8 @@ docker-compose exec -u zulip zulip cat /home/zulip/deployments/current/version.p
428428
### Upgrading from a Git repository
429429

430430
1. Edit `docker-compose.yml` to comment out the `image` line, and
431-
specify the Git commit you'd like to build the zulip container from.
432-
E.g.:
431+
specify the Git commit you'd like to build the zulip container from.
432+
E.g.:
433433

434434
```
435435
zulip:
@@ -458,7 +458,7 @@ The Docker Compose configuration for version 6.0-0 and higher default
458458
to using PostgreSQL 14, as the previously-used PostgreSQL 10 is no
459459
longer supported. Because the data is specific to the version of
460460
PostgreSQL which is running, it must be dumped and re-loaded into a
461-
new volume to upgrade. PostgreSQL 14 will refuse to start if provided
461+
new volume to upgrade. PostgreSQL 14 will refuse to start if provided
462462
with un-migrated data from PostgreSQL 10.
463463

464464
The provided `upgrade-postgresql` tool will dump the contents of the
@@ -476,7 +476,7 @@ upgraded the major postgres version).
476476

477477
These instructions assume that you have not changed the default
478478
Postgres data path (`/opt/docker/zulip/postgresql/data`) in your
479-
`docker-compose.yml`. If you have changed it, please replace all
479+
`docker-compose.yml`. If you have changed it, please replace all
480480
occurences of `/opt/docker/zulip/postgresql/data` with your path.
481481

482482
1. Make a backup of your Zulip Postgres data dir.
@@ -485,6 +485,7 @@ occurences of `/opt/docker/zulip/postgresql/data` with your path.
485485
`docker stop` and not `docker-compose stop`).
486486

487487
3. Create a new (upgraded) Postgres container using a different data directory:
488+
488489
```
489490
docker run -d \
490491
--name postgresnew \
@@ -496,34 +497,39 @@ docker run -d \
496497
```
497498

498499
4. Use `pg_dumpall` to dump all data from the existing Postgres container to
499-
the new Postgres container:
500+
the new Postgres container:
501+
500502
```
501503
docker-compose exec database pg_dumpall -U postgres | \
502504
docker exec -i postgresnew psql -U postgres
503505
```
504506

505507
5. Stop and remove both Postgres containers:
508+
506509
```
507510
docker-compose rm --stop database
508511
docker rm --stop postgresnew
509512
```
510513

511514
6. Edit your `docker-compose.yml` to use the
512-
`zulip/zulip-postgresql:latest` image for the `database` container
513-
(this is the default in `zulip/docker-zulip`).
515+
`zulip/zulip-postgresql:latest` image for the `database` container
516+
(this is the default in `zulip/docker-zulip`).
514517

515518
7. Replace the old Postgres data directory with upgraded data directory:
519+
516520
```
517521
mv /opt/docker/zulip/postgresql/data /opt/docker/zulip/postgresql/old
518522
mv /opt/docker/zulip/postgresql/new /opt/docker/zulip/postgresql/data
519523
```
520524

521525
8. Delete the old existing containers:
526+
522527
```
523528
docker-compose rm
524529
```
525530

526531
9. Start Zulip up again:
532+
527533
```
528534
docker-compose up
529535
```
@@ -535,11 +541,11 @@ That should be it. Your Postgres data has now been updated to use the
535541

536542
Common issues include:
537543

538-
* Invalid configuration resulting in the `zulip` container not
544+
- Invalid configuration resulting in the `zulip` container not
539545
starting; check `docker-compose ps` to see if it started, and then
540546
read the logs for the Zulip container to see why it failed.
541-
* A new Zulip setting not being passed through the Docker
542-
[entrypoint.sh script](/entrypoint.sh) properly. If you
547+
- A new Zulip setting not being passed through the Docker
548+
[entrypoint.sh script](/entrypoint.sh) properly. If you
543549
run into this sort of problem you can work around it by specifying a
544550
`ZULIP_CUSTOM_SETTINGS` with one setting per line below, but please
545551
report an issue so that we can fix this for everyone else.
@@ -557,15 +563,15 @@ documentation, so we'd love any and all feedback!
557563
## Contributing
558564

559565
We love community contributions, and respond quickly to issues and
560-
PRs. Some particularly useful ways to contribute right now are:
566+
PRs. Some particularly useful ways to contribute right now are:
561567

562-
* Contribute to this documentation by opening issues about what
568+
- Contribute to this documentation by opening issues about what
563569
confused you or submitting pull requests!
564-
* Reporting bugs or rough edges!
570+
- Reporting bugs or rough edges!
565571

566572
## Credits
567573

568-
Huge thanks to everyone who has contributed. Special thanks to
574+
Huge thanks to everyone who has contributed. Special thanks to
569575
[Alexander Trost](http://github.com/galexrt/), who created
570576
`docker-zulip` and did a huge amount of the early work required to
571577
make a high-quality Docker image for Zulip possible.

0 commit comments

Comments
 (0)