Update run-document-server.sh

This commit is contained in:
Jiří Štefka 2022-05-15 15:19:50 +02:00 committed by GitHub
parent b9f2fdaf9d
commit eb2e39acef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -66,29 +66,6 @@ NGINX_CONFIG_PATH="/etc/nginx/nginx.conf"
NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}
NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$(ulimit -n)}
# Chech if lager file limits should be set
if [ "$LARGER_FILE_LIMITS" = "true" ]; then
if [ -e /app/ds/file_limits_set ]; then
echo ""
else
touch /app/ds/file_limits_set
/bin/sh -c 'sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver-example/production-linux.json'
/bin/sh -c 'sed -i '9iclient_max_body_size 1000M;' /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf'
/bin/sh -c 'sed -i '16iclient_max_body_size 1000M;' /etc/nginx/nginx.conf'
/bin/sh -c 'sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver/default.json'
/bin/sh -c 'sed -i -e 's/50MB/5000MB/g' /etc/onlyoffice/documentserver/default.json'
/bin/sh -c 'sed -i -e 's/300MB/3000MB/g' /etc/onlyoffice/documentserver/default.json'
/bin/sh -c 'sed -i 's/^client_max_body_size 100m;$/client_max_body_size 1000m;/' /etc/onlyoffice/documentserver/nginx/includes/ds-common.conf'
/bin/sh -c 'service nginx restart'
/bin/sh -c 'supervisorctl restart all'
fi
fi
JWT_ENABLED=${JWT_ENABLED:-false}
# validate user's vars before usinig in json
@ -636,6 +613,29 @@ fi
# it run in all cases.
service nginx start
# Check if lager file limits should be set
if [ "$LARGER_FILE_LIMITS" = "true" ]; then
if [ -e /app/ds/file_limits_set ]; then
echo ""
else
touch /app/ds/file_limits_set
sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver-example/production-linux.json
sed -i '9iclient_max_body_size 1000M;' /etc/onlyoffice/documentserver-example/nginx/includes/ds-example.conf
sed -i '16iclient_max_body_size 1000M;' /etc/nginx/nginx.conf
sed -i -e 's/104857600/10485760000/g' /etc/onlyoffice/documentserver/default.json
sed -i -e 's/50MB/5000MB/g' /etc/onlyoffice/documentserver/default.json
sed -i -e 's/300MB/3000MB/g' /etc/onlyoffice/documentserver/default.json
sed -i 's/^client_max_body_size 100m;$/client_max_body_size 1000m;/' /etc/onlyoffice/documentserver/nginx/includes/ds-common.conf
service nginx restart
supervisorctl restart all
fi
fi
if [ "${LETS_ENCRYPT_DOMAIN}" != "" -a "${LETS_ENCRYPT_MAIL}" != "" ]; then
if [ ! -f "${SSL_CERTIFICATE_PATH}" -a ! -f "${SSL_KEY_PATH}" ]; then
documentserver-letsencrypt.sh ${LETS_ENCRYPT_MAIL} ${LETS_ENCRYPT_DOMAIN}