Add obligatory use of JWT parameters (#562)

This commit is contained in:
Evgeniy Antonyuk 2022-12-30 12:40:54 +03:00 committed by GitHub
parent 01f8337dcb
commit 759bed5c14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -220,10 +220,20 @@ Then launch containers on it using the 'docker run --net onlyoffice' option:
Follow [these steps](#installing-mysql) to install MySQL server.
**STEP 3**: Install ONLYOFFICE Document Server.
**STEP 3**: Generate JWT Secret
JWT secret defines the secret key to validate the JSON Web Token in the request to the **ONLYOFFICE Document Server**. You can specify it yourself or easily get it using the command:
```
JWT_SECRET=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c 12);
```
**STEP 4**: Install ONLYOFFICE Document Server.
```bash
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-document-server \
-e JWT_ENABLED=true \
-e JWT_SECRET=${JWT_SECRET} \
-e JWT_HEADER=AuthorizationJwt \
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
@ -231,7 +241,7 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-doc
onlyoffice/documentserver
```
**STEP 4**: Install ONLYOFFICE Mail Server.
**STEP 5**: Install ONLYOFFICE Mail Server.
For the mail server correct work you need to specify its hostname 'yourdomain.com'.
@ -253,7 +263,7 @@ The additional parameters for mail server are available [here](https://github.co
To learn more, refer to the [ONLYOFFICE Mail Server documentation](https://github.com/ONLYOFFICE/Docker-MailServer "ONLYOFFICE Mail Server documentation").
**STEP 5**: Install ONLYOFFICE Community Server
**STEP 6**: Install ONLYOFFICE Community Server
```bash
sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \
@ -264,6 +274,9 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-com
-e MYSQL_SERVER_PASS=onlyoffice_pass \
-e DOCUMENT_SERVER_PORT_80_TCP_ADDR=onlyoffice-document-server \
-e DOCUMENT_SERVER_JWT_ENABLED=true \
-e DOCUMENT_SERVER_JWT_SECRET=${JWT_SECRET} \
-e DOCUMENT_SERVER_JWT_HEADER=AuthorizationJwt \
-e MAIL_SERVER_API_HOST=${MAIL_SERVER_IP} \
-e MAIL_SERVER_DB_HOST=onlyoffice-mysql-server \