Add configuration wrongPortalNameUrl

This commit is contained in:
Evgeniy Antonyuk 2023-09-26 14:52:52 +04:00
parent 44c46eb719
commit d57e159806
6 changed files with 7 additions and 0 deletions

View File

@ -51,6 +51,7 @@ override_dh_auto_build:
sed 's_etc/nginx_etc/openresty_g' -i ${SRC_PATH}/config/nginx/*.conf
sed 's/teamlab.info/onlyoffice.com/g' -i ${SRC_PATH}/config/autofac.consumers.json
json -I -f ${SRC_PATH}/public/scripts/config.json -e "this.wrongPortalNameUrl=\"\""
sed -e 's/$$router_host/127.0.0.1/g' -e 's/the_host/host/g' -e 's/the_scheme/scheme/g' -e 's_includes_/etc/openresty/includes_g' -i ${SRC_PATH}/build/install/docker/config/nginx/onlyoffice-proxy*.conf
sed "s_\(.*root\).*;_\1 \"/var/www/${PRODUCT}\";_g" -i ${SRC_PATH}/build/install/docker/config/nginx/letsencrypt.conf
sed -e '/.pid/d' -e '/temp_path/d' -e 's_etc/nginx_etc/openresty_g' -i ${SRC_PATH}/build/install/docker/config/nginx/templates/nginx.conf.template

View File

@ -41,6 +41,7 @@
APP_CORE_BASE_DOMAIN=localhost
APP_URL_PORTAL="http://localhost:8092"
OAUTH_REDIRECT_URL="https://service.onlyoffice.com/oauth2.aspx"
WRONG_PORTAL_NAME_URL=""
LOG_LEVEL="Warning"
DEBUG_INFO="false"

View File

@ -28,6 +28,7 @@ x-service: &x-service-base
APP_URL_PORTAL: ${APP_URL_PORTAL}
INSTALLATION_TYPE: ${INSTALLATION_TYPE}
OAUTH_REDIRECT_URL: ${OAUTH_REDIRECT_URL}
WRONG_PORTAL_NAME_URL: ${WRONG_PORTAL_NAME_URL}
DOCUMENT_SERVER_JWT_SECRET: ${DOCUMENT_SERVER_JWT_SECRET}
DOCUMENT_SERVER_JWT_HEADER: ${DOCUMENT_SERVER_JWT_HEADER}
DOCUMENT_SERVER_URL_PUBLIC: ${DOCUMENT_SERVER_URL_PUBLIC}

View File

@ -1,7 +1,9 @@
#!/bin/sh
WRONG_PORTAL_NAME_URL=${WRONG_PORTAL_NAME_URL:-""}
REDIS_HOST=${REDIS_HOST:-"${REDIS_CONTAINER_NAME}"}
REDIS_PORT=${REDIS_PORT:-"6379"}
envsubst '$MAP_HASH_BUCKET_SIZE,$COUNT_WORKER_CONNECTIONS' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
sed -i "s~\(redis_host =\).*~\1 \"$REDIS_HOST\"~" /etc/nginx/conf.d/onlyoffice.conf
sed -i "s~\(redis_port =\).*~\1 $REDIS_PORT~" /etc/nginx/conf.d/onlyoffice.conf
sed -i "s~\(\"wrongPortalNameUrl\":\).*,~\1 \"${WRONG_PORTAL_NAME_URL}\",~g" /var/www/public/scripts/config.json

View File

@ -22,6 +22,7 @@ sed 's_\(minlevel=\)".*"_\1"Warn"_g' -i %{_builddir}/%{sourcename}/config/nlog.c
sed 's_etc/nginx_etc/openresty_g' -i %{_builddir}/%{sourcename}/config/nginx/*.conf
sed 's/teamlab.info/onlyoffice.com/g' -i %{_builddir}/%{sourcename}/config/autofac.consumers.json
json -I -f %{_builddir}/%{sourcename}/public/scripts/config.json -e "this.wrongPortalNameUrl=\"\""
sed -e 's/$router_host/127.0.0.1/g' -e 's/the_host/host/g' -e 's/the_scheme/scheme/g' -e 's_includes_/etc/openresty/includes_g' -i %{_builddir}/%{sourcename}/build/install/docker/config/nginx/onlyoffice-proxy*.conf
sed -e '/.pid/d' -e '/temp_path/d' -e 's_etc/nginx_etc/openresty_g' -i %{_builddir}/%{sourcename}/build/install/docker/config/nginx/templates/nginx.conf.template
sed -i "s_\(.*root\).*;_\1 \"/var/www/%{product}\";_g" -i %{_builddir}/%{sourcename}/build/install/docker/config/nginx/letsencrypt.conf

View File

@ -56,6 +56,7 @@ del /f /q build\install\win\Files\config\*.dev.json
::redirectUrl value replacement
%sed% "s/teamlab.info/onlyoffice.com/g" -i build\install\win\Files\config/autofac.consumers.json
%sed% "s_\(\"wrongPortalNameUrl\":\).*,_\1 \"\",_g" -i build\install\win\Files\public\scripts\config.json
REM echo ######## Remove AWSTarget from nlog.config ########
%sed% -i "/<target type=\"AWSTarget\" name=\"aws\"/,/<\/target>/d; /<target type=\"AWSTarget\" name=\"aws_sql\"/,/<\/target>/d" build\install\win\Files\config\nlog.config