diff --git a/set_configuration.sh b/set_configuration.sh new file mode 100644 index 0000000..32976d2 --- /dev/null +++ b/set_configuration.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +set -x + +# Получение списка доверенных доменов и проверка наличия nginx-server +docker exec -u www-data app-server php occ --no-warnings config:system:get trusted_domains >> trusted_domain.tmp + +if ! grep -q "nginx-server" trusted_domain.tmp; then + TRUSTED_INDEX=$(cat trusted_domain.tmp | wc -l); + docker exec -u www-data app-server php occ --no-warnings config:system:set trusted_domains $TRUSTED_INDEX --value="nginx-server" +fi + +rm trusted_domain.tmp + +# Установка OnlyOffice и конфигурация +docker exec -u www-data app-server php occ --no-warnings app:install onlyoffice + +docker exec -u www-data app-server php occ --no-warnings config:system:set onlyoffice DocumentServerUrl --value="/ds-vpath/" +docker exec -u www-data app-server php occ --no-warnings config:system:set onlyoffice DocumentServerInternalUrl --value="http://onlyoffice-document-server/" +docker exec -u www-data app-server php occ --no-warnings config:system:set onlyoffice StorageUrl --value="http://nginx-server/" +docker exec -u www-data app-server php occ --no-warnings config:system:set onlyoffice jwt_secret --value="secret" \ No newline at end of file