21 lines
1.2 KiB
Bash
21 lines
1.2 KiB
Bash
|
#!/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"
|