From 211ae509801d464da559745c370a1e42e90a2621 Mon Sep 17 00:00:00 2001 From: Roman Demidov <58073444+romandemidov@users.noreply.github.com> Date: Tue, 20 Oct 2020 16:14:55 +0300 Subject: [PATCH] Fix #281: Add option to disable CPU-heavy tasks on startup (#293) * Fix #281: Add option to disable CPU-heavy tasks on startup * Update README.md Co-authored-by: Sandro * Update README.md Co-authored-by: Roman Co-authored-by: Sandro --- README.md | 1 + run-document-server.sh | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b36a16..d3342a9 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,7 @@ Below is the complete list of parameters that can be set using environment varia - **JWT_HEADER**: Defines the http header that will be used to send the JSON Web Token. Defaults to `Authorization`. - **JWT_IN_BODY**: Specifies the enabling the token validation in the request body to the ONLYOFFICE Document Server. Defaults to `false`. - **USE_UNAUTHORIZED_STORAGE**: Set to `true`if using selfsigned certificates for your storage server e.g. Nextcloud. Defaults to `false` +- **GENERATE_FONTS**: When 'true' regenerates fonts list and the fonts thumbnails etc. at each start. Defaults to `true` - **METRICS_ENABLED**: Specifies the enabling StatsD for ONLYOFFICE Document Server. Defaults to `false`. - **METRICS_HOST**: Defines StatsD listening host. Defaults to `localhost`. - **METRICS_PORT**: Defines StatsD listening port. Defaults to `8125`. diff --git a/run-document-server.sh b/run-document-server.sh index 6adcc65..0d97c29 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -55,6 +55,8 @@ JWT_SECRET=${JWT_SECRET:-secret} JWT_HEADER=${JWT_HEADER:-Authorization} JWT_IN_BODY=${JWT_IN_BODY:-false} +GENERATE_FONTS=${GENERATE_FONTS:-true} + if [[ ${PRODUCT_NAME} == "documentserver" ]]; then REDIS_ENABLED=false else @@ -543,7 +545,9 @@ fi service nginx start # Regenerate the fonts list and the fonts thumbnails -documentserver-generate-allfonts.sh ${ONLYOFFICE_DATA_CONTAINER} +if [ "${GENERATE_FONTS}" == "true" ]; then + documentserver-generate-allfonts.sh ${ONLYOFFICE_DATA_CONTAINER} +fi documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER} tail -f /var/log/${COMPANY_NAME}/**/*.log &