Merge branch 'release/v2.5.0' into feature/logo-handler

This commit is contained in:
Alexey Safronov 2024-04-01 16:15:29 +04:00
commit 4deb425ad3
23 changed files with 122 additions and 56 deletions

View File

@ -20,10 +20,19 @@ def help():
print("d Run dnsmasq.")
print()
rd = os.path.dirname(os.path.abspath(__file__))
dir = os.path.abspath(os.path.join(rd, ".."))
dockerDir = os.path.join(dir, "buildtools", "install", "docker")
local_ip = socket.gethostbyname_ex(socket.gethostname())[-1][-1]
networks = socket.gethostbyname_ex(socket.gethostname())
local_ip = networks[-1][-1]
if local_ip == "127.0.0.1":
local_ip = networks[-1][0]
if local_ip == "127.0.0.1":
print("Error: Local IP is 127.0.0.1", networks)
sys.exit(1)
doceditor = f"{local_ip}:5013"
login = f"{local_ip}:5011"

View File

@ -74,6 +74,14 @@ elif dpkg -l | grep -q "mysql-apt-config" && [ "$(apt-cache policy mysql-apt-con
rm -f ${MYSQL_PACKAGE_NAME}
fi
if ! grep -q "mysql-innovation" /etc/apt/sources.list.d/mysql.list; then
echo "deb [signed-by=/usr/share/keyrings/mysql-apt-config.gpg] http://repo.mysql.com/apt/${DIST} ${DISTRIB_CODENAME} mysql-innovation" | sudo tee -a /etc/apt/sources.list.d/mysql.list
if apt-get -y update 2>&1 | grep -q "^W: .*mysql-innovation"; then
sudo sed -i '/mysql-innovation/d' /etc/apt/sources.list.d/mysql.list
fi
fi
# add redis repo
if [ "$DIST" = "ubuntu" ]; then
curl -fsSL https://packages.redis.io/gpg | gpg --no-default-keyring --keyring gnupg-ring:/usr/share/keyrings/redis.gpg --import

View File

@ -463,6 +463,13 @@ while [ "$1" != "" ]; do
fi
;;
-noni | --noninteractive )
if [ "$2" != "" ]; then
NON_INTERACTIVE=$2
shift
fi
;;
-? | -h | --help )
echo " Usage: bash $HELP_TARGET [PARAMETER] [[PARAMETER], ...]"
echo
@ -511,6 +518,7 @@ while [ "$1" != "" ]; do
echo " -lem, --letsencryptmail defines the domain administator mail address for Let's Encrypt certificate"
echo " -cf, --certfile path to the certificate file for the domain"
echo " -ckf, --certkeyfile path to the private key file for the certificate"
echo " -noni, --noninteractive auto confirm all questions (true|false)"
echo " -dbm, --databasemigration database migration (true|false)"
echo " -ms, --makeswap make swap file (true|false)"
echo " -?, -h, --help this help"
@ -884,6 +892,10 @@ create_network () {
}
read_continue_installation () {
if [[ "${NON_INTERACTIVE}" = "true" ]]; then
return 0
fi
read -p "Continue installation [Y/N]? " CHOICE_INSTALLATION
case "$CHOICE_INSTALLATION" in
y|Y )
@ -1196,10 +1208,12 @@ install_mysql_server () {
reconfigure MYSQL_USER ${MYSQL_USER}
reconfigure MYSQL_PASSWORD ${MYSQL_PASSWORD}
reconfigure MYSQL_ROOT_PASSWORD ${MYSQL_ROOT_PASSWORD}
reconfigure MYSQL_VERSION ${MYSQL_VERSION}
if [[ -z ${MYSQL_HOST} ]] && [ "$INSTALL_MYSQL_SERVER" == "true" ]; then
reconfigure MYSQL_VERSION ${MYSQL_VERSION}
docker-compose -f $BASE_DIR/db.yml up -d
elif [ "$INSTALL_MYSQL_SERVER" == "pull" ]; then
docker-compose -f $BASE_DIR/db.yml pull
elif [ ! -z "$MYSQL_HOST" ]; then
establish_conn ${MYSQL_HOST} "${MYSQL_PORT:-"3306"}" "MySQL"
reconfigure MYSQL_HOST ${MYSQL_HOST}
@ -1210,9 +1224,11 @@ install_mysql_server () {
install_document_server () {
reconfigure DOCUMENT_SERVER_JWT_HEADER ${DOCUMENT_SERVER_JWT_HEADER}
reconfigure DOCUMENT_SERVER_JWT_SECRET ${DOCUMENT_SERVER_JWT_SECRET}
if [[ -z ${DOCUMENT_SERVER_HOST} ]] && [ "$INSTALL_DOCUMENT_SERVER" == "true" ]; then
reconfigure DOCUMENT_SERVER_IMAGE_NAME "${DOCUMENT_SERVER_IMAGE_NAME}:${DOCUMENT_SERVER_VERSION:-$(get_available_version "$DOCUMENT_SERVER_IMAGE_NAME")}"
if [[ -z ${DOCUMENT_SERVER_HOST} ]] && [ "$INSTALL_DOCUMENT_SERVER" == "true" ]; then
docker-compose -f $BASE_DIR/ds.yml up -d
elif [ "$INSTALL_DOCUMENT_SERVER" == "pull" ]; then
docker-compose -f $BASE_DIR/ds.yml pull
elif [ ! -z "$DOCUMENT_SERVER_HOST" ]; then
APP_URL_PORTAL=${APP_URL_PORTAL:-"http://$(curl -s ifconfig.me):${EXTERNAL_PORT}"}
establish_conn ${DOCUMENT_SERVER_HOST} ${DOCUMENT_SERVER_PORT} "${PACKAGE_SYSNAME^^} Docs"
@ -1224,6 +1240,8 @@ install_document_server () {
install_rabbitmq () {
if [[ -z ${RABBIT_HOST} ]] && [ "$INSTALL_RABBITMQ" == "true" ]; then
docker-compose -f $BASE_DIR/rabbitmq.yml up -d
elif [ "$INSTALL_RABBITMQ" == "pull" ]; then
docker-compose -f $BASE_DIR/rabbitmq.yml pull
elif [ ! -z "$RABBIT_HOST" ]; then
establish_conn ${RABBIT_HOST} "${RABBIT_PORT:-"5672"}" "RabbitMQ"
reconfigure RABBIT_HOST ${RABBIT_HOST}
@ -1237,6 +1255,8 @@ install_rabbitmq () {
install_redis () {
if [[ -z ${REDIS_HOST} ]] && [ "$INSTALL_REDIS" == "true" ]; then
docker-compose -f $BASE_DIR/redis.yml up -d
elif [ "$INSTALL_REDIS" == "pull" ]; then
docker-compose -f $BASE_DIR/redis.yml pull
elif [ ! -z "$REDIS_HOST" ]; then
establish_conn ${REDIS_HOST} "${REDIS_PORT:-"6379"}" "Redis"
reconfigure REDIS_HOST ${REDIS_HOST}
@ -1247,14 +1267,16 @@ install_redis () {
}
install_elasticsearch () {
reconfigure ELK_VERSION ${ELK_VERSION}
if [[ -z ${ELK_HOST} ]] && [ "$INSTALL_ELASTICSEARCH" == "true" ]; then
if [ $(free --mega | grep -oP '\d+' | head -n 1) -gt "12000" ]; then #RAM ~12Gb
sed -i 's/Xms[0-9]g/Xms4g/g; s/Xmx[0-9]g/Xmx4g/g' $BASE_DIR/opensearch.yml
else
sed -i 's/Xms[0-9]g/Xms1g/g; s/Xmx[0-9]g/Xmx1g/g' $BASE_DIR/opensearch.yml
fi
reconfigure ELK_VERSION ${ELK_VERSION}
docker-compose -f $BASE_DIR/opensearch.yml up -d
elif [ "$INSTALL_ELASTICSEARCH" == "pull" ]; then
docker-compose -f $BASE_DIR/opensearch.yml pull
elif [ ! -z "$ELK_HOST" ]; then
establish_conn ${ELK_HOST} "${ELK_PORT:-"9200"}" "search engine"
reconfigure ELK_SHEME "${ELK_SHEME:-"http"}"
@ -1266,7 +1288,7 @@ install_elasticsearch () {
install_product () {
DOCKER_TAG="${DOCKER_TAG:-$(get_available_version ${IMAGE_NAME})}"
reconfigure DOCKER_TAG ${DOCKER_TAG}
if [ "$INSTALL_PRODUCT" == "true" ]; then
[ "${UPDATE}" = "true" ] && LOCAL_CONTAINER_TAG="$(docker inspect --format='{{index .Config.Image}}' ${CONTAINER_NAME} | awk -F':' '{print $2}')"
if [ "${UPDATE}" = "true" ] && [ "${LOCAL_CONTAINER_TAG}" != "${DOCKER_TAG}" ]; then
@ -1298,6 +1320,13 @@ install_product () {
elif [ ! -z "${LETS_ENCRYPT_DOMAIN}" ] && [ ! -z "${LETS_ENCRYPT_MAIL}" ]; then
bash $BASE_DIR/config/${PRODUCT}-ssl-setup "${LETS_ENCRYPT_MAIL}" "${LETS_ENCRYPT_DOMAIN}"
fi
elif [ "$INSTALL_PRODUCT" == "pull" ]; then
docker-compose -f $BASE_DIR/migration-runner.yml pull
docker-compose -f $BASE_DIR/${PRODUCT}.yml pull
docker-compose -f ${PROXY_YML} pull
docker-compose -f $BASE_DIR/notify.yml pull
docker-compose -f $BASE_DIR/healthchecks.yml pull
fi
}
make_swap () {
@ -1382,9 +1411,7 @@ start_installation () {
install_elasticsearch
if [ "$INSTALL_PRODUCT" == "true" ]; then
install_product
fi
echo ""
echo "Thank you for installing ${PACKAGE_SYSNAME^^} ${PRODUCT_NAME}."

View File

@ -57,6 +57,10 @@ dnf remove -y @mysql && dnf module -y reset mysql && dnf module -y disable mysql
MYSQL_REPO_VERSION="$(curl https://repo.mysql.com | grep -oP "mysql80-community-release-${MYSQL_DISTR_NAME}${REV}-\K.*" | grep -o '^[^.]*' | sort | tail -n1)"
yum localinstall -y https://repo.mysql.com/mysql80-community-release-${MYSQL_DISTR_NAME}${REV}-${MYSQL_REPO_VERSION}.noarch.rpm || true
if ! yum repolist enabled | grep -q mysql-innovation-community; then
sudo yum-config-manager --enable mysql-innovation-community
fi
if ! rpm -q mysql-community-server; then
MYSQL_FIRST_TIME_INSTALL="true";
fi

View File

@ -1,5 +1,3 @@
version: "3.8"
services:
onlyoffice-backup-background-tasks:
build:

View File

@ -1,5 +1,3 @@
version: "3.8"
services:
onlyoffice-mysql-server:
image: ${MYSQL_IMAGE}

View File

@ -1,4 +1,3 @@
version: "3.8"
services:
dnsmasq:
image: jpillora/dnsmasq

View File

@ -1,4 +1,3 @@
version: "3.8"
x-profiles-local: &x-profiles-local
profiles: ["backend-local"]
environment:

View File

@ -1,4 +1,3 @@
version: "3.8"
x-healthcheck: &x-healthcheck
test: curl --fail http://127.0.0.1 || exit 1
interval: 60s

View File

@ -1,4 +1,3 @@
version: "3.8"
x-healthcheck:
&x-healthcheck
test: curl --fail http://127.0.0.1 || exit 1

View File

@ -1,4 +1,3 @@
version: '3.6'
services:
onlyoffice-document-server:
image: "${DOCUMENT_SERVER_IMAGE_NAME}"

View File

@ -1,4 +1,3 @@
version: "3.8"
x-service:
&x-service-base
container_name: base

View File

@ -1,4 +1,3 @@
version: "3.6"
services:
onlyoffice-zookeeper:
image: zookeeper:latest

View File

@ -1,5 +1,3 @@
version: "3.8"
services:
onlyoffice-migration-runner:
image: "${REPO}/${DOCKER_IMAGE_PREFIX}-migration-runner:${DOCKER_TAG}"

View File

@ -1,4 +1,3 @@
version: "3.8"
x-healthcheck:
&x-healthcheck
test: curl --fail http://127.0.0.1 || exit 1

View File

@ -1,4 +1,3 @@
version: "3"
services:
onlyoffice-opensearch:
image: onlyoffice/opensearch:${ELK_VERSION}

View File

@ -1,4 +1,3 @@
version: "3.8"
x-healthcheck:
&x-healthcheck
test: curl --fail http://127.0.0.1 || exit 1

View File

@ -1,4 +1,3 @@
version: "3.8"
x-healthcheck:
&x-healthcheck
test: curl --fail http://127.0.0.1 || exit 1

View File

@ -1,4 +1,3 @@
version: "3"
services:
onlyoffice-rabbitmq:
image: rabbitmq:3

View File

@ -1,4 +1,3 @@
version: "3"
services:
onlyoffice-redis:
image: redis:7

View File

@ -33,6 +33,7 @@
<ROW Property="ARPURLUPDATEINFO" Value="https://www.onlyoffice.com/download-docspace.aspx"/>
<ROW Property="BASE_DOMAIN" Value="localhost"/>
<ROW Property="COMMON_SHORTCUT_NAME" Value="ONLYOFFICE"/>
<ROW Property="DASHBOARDS_PWD" Value=" "/>
<ROW Property="DATABASE_MIGRATION" Value="true"/>
<ROW Property="DB_HOST" Value="localhost"/>
<ROW Property="DB_NAME" Value="onlyoffice"/>
@ -516,6 +517,7 @@
<ROW Property="DOCUMENT_SERVER_JWT_SECRET" Signature_="AppSearchSign_23"/>
<ROW Property="DOCUMENT_SERVER_PORT" Signature_="AppSearchSign_24"/>
<ROW Property="MACHINE_KEY" Signature_="AppSearchSign_25"/>
<ROW Property="DASHBOARDS_PWD" Signature_="AppSearchSign_26"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiBinaryComponent">
<ROW Name="NetFirewall.dll" SourcePath="&lt;AI_CUSTACTS&gt;NetFirewall.dll"/>
@ -1040,6 +1042,7 @@
<ROW Action="SET_APPDIR" Type="307" Source="APPDIR" Target="[ProgramFilesFolder][Manufacturer]\[ProductName]" MultiBuildTarget="DefaultBuild:[ProgramFilesFolder][INSTALL_ROOT_FOLDER_NAME]\DocSpace#ExeBuild:[ProgramFilesFolder][INSTALL_ROOT_FOLDER_NAME]\DocSpace"/>
<ROW Action="SET_SHORTCUTDIR" Type="307" Source="SHORTCUTDIR" Target="[ProgramMenuFolder][ProductName]" MultiBuildTarget="DefaultBuild:[ProgramMenuFolder][INSTALL_ROOT_FOLDER_NAME]\DocSpace#ExeBuild:[ProgramMenuFolder][INSTALL_ROOT_FOLDER_NAME]\DocSpace"/>
<ROW Action="SET_TARGETDIR_TO_APPDIR" Type="51" Source="TARGETDIR" Target="[APPDIR]"/>
<ROW Action="SetDashboardsPwd" Type="6" Source="utils.vbs" Target="SetDashboardsPwd"/>
<ROW Action="SetDocumentServerJWTSecretProp" Type="6" Source="utils.vbs" Target="SetDocumentServerJWTSecretProp"/>
<ROW Action="SetMACHINEKEY" Type="262" Source="utils.vbs" Target="SetMACHINEKEY"/>
<ROW Action="SetSERVERNAME" Type="51" Source="SERVER_NAME" Target="[ComputerName]"/>
@ -1287,6 +1290,7 @@
<ROW Action="AI_PRESERVE_INSTALL_TYPE" Sequence="199"/>
<ROW Action="AI_RestartElevated" Sequence="51" Builds="ExeBuild"/>
<ROW Action="SetMACHINEKEY" Condition="( ( NOT Installed ) OR ( Installed AND REMOVE &lt;&gt; &quot;ALL&quot; AND AI_INSTALL_MODE &lt;&gt; &quot;Remove&quot; ) ) AND ( MACHINE_KEY = &quot; &quot; )" Sequence="1107"/>
<ROW Action="SetDashboardsPwd" Condition="( ( NOT Installed ) OR ( Installed AND REMOVE &lt;&gt; &quot;ALL&quot; AND AI_INSTALL_MODE &lt;&gt; &quot;Remove&quot; ) ) AND ( DASHBOARDS_PWD = &quot; &quot; )" Sequence="1108"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.MsiLaunchConditionsComponent">
<ROW Condition="( Version9X OR ( NOT VersionNT64 ) OR ( VersionNT64 AND ((VersionNT64 &lt;&gt; 600) OR (MsiNTProductType &lt;&gt; 1)) AND ((VersionNT64 &lt;&gt; 600) OR (MsiNTProductType = 1)) AND ((VersionNT64 &lt;&gt; 601) OR (MsiNTProductType &lt;&gt; 1)) AND ((VersionNT64 &lt;&gt; 601) OR (MsiNTProductType = 1)) AND ((VersionNT64 &lt;&gt; 602) OR (MsiNTProductType &lt;&gt; 1)) AND ((VersionNT64 &lt;&gt; 602) OR (MsiNTProductType = 1)) AND ((VersionNT64 &lt;&gt; 603) OR (MsiNTProductType &lt;&gt; 1)) AND ((VersionNT64 &lt;&gt; 603) OR (MsiNTProductType = 1)) AND ((VersionNT64 &lt;&gt; 1000) OR (MsiNTProductType &lt;&gt; 1)) AND ((VersionNT64 &lt;&gt; 1100) OR (MsiNTProductType &lt;&gt; 1)) ) )" Description="[ProductName] cannot be installed on the following Windows versions: [WindowsTypeNT64Display]." DescriptionLocId="AI.LaunchCondition.NoSpecificNT64" IsPredefined="true" Builds="DefaultBuild;ExeBuild"/>
@ -1325,6 +1329,7 @@
<ROW Signature_="AppSearchSign_23" Root="2" Key="Software\[Manufacturer]\[ShortProductName]" Name="DOCUMENT_SERVER_JWT_SECRET" Type="2"/>
<ROW Signature_="AppSearchSign_24" Root="2" Key="Software\[Manufacturer]\[ShortProductName]" Name="DOCUMENT_SERVER_PORT" Type="2"/>
<ROW Signature_="AppSearchSign_25" Root="2" Key="Software\[Manufacturer]\[ShortProductName]" Name="MACHINE_KEY" Type="2"/>
<ROW Signature_="AppSearchSign_26" Root="2" Key="Software\[Manufacturer]\[ShortProductName]" Name="DASHBOARDS_PWD" Type="2"/>
<ROW Signature_="AppSearchSign_3" Root="2" Key="Software\[Manufacturer]\[ShortProductName]" Name="PS_DB_USER" Type="2"/>
<ROW Signature_="AppSearchSign_4" Root="2" Key="Software\[Manufacturer]\[ShortProductName]" Name="PS_DB_PWD" Type="2"/>
<ROW Signature_="AppSearchSign_5" Root="2" Key="Software\[Manufacturer]\[ShortProductName]" Name="PS_DB_PORT" Type="2"/>
@ -1345,6 +1350,7 @@
<ROW Registry="Comments" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="Comments" Value="[ARPCOMMENTS]" Component_="AI_CustomARPName"/>
<ROW Registry="Contact" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\[ProductName] [ProductVersion]" Name="Contact" Value="[ARPCONTACT]" Component_="AI_CustomARPName"/>
<ROW Registry="CurrentVersion" Root="-1" Key="Software\Microsoft\Windows\CurrentVersion" Name="\"/>
<ROW Registry="DASHBOARDS_PWD" Root="-1" Key="Software\[Manufacturer]\[ShortProductName]" Name="DASHBOARDS_PWD" Value="[DASHBOARDS_PWD]" Component_="APPDIR"/>
<ROW Registry="DB_HOST" Root="-1" Key="Software\[Manufacturer]\[ShortProductName]" Name="DB_HOST" Value="[DB_HOST]" Component_="APPDIR"/>
<ROW Registry="DB_NAME" Root="-1" Key="Software\[Manufacturer]\[ShortProductName]" Name="DB_NAME" Value="[DB_NAME]" Component_="APPDIR"/>
<ROW Registry="DB_PORT" Root="-1" Key="Software\[Manufacturer]\[ShortProductName]" Name="DB_PORT" Value="[DB_PORT]" Component_="APPDIR"/>
@ -1587,6 +1593,7 @@
<ROW Name="ReplacePort" TxtUpdateSet="fluentbit.conf" FindPattern="OPENSEARCH_PORT" ReplacePattern="[OPENSEARCH_PORT]" Options="2" Order="2" FileEncoding="-1"/>
<ROW Name="ReplaceScheme" TxtUpdateSet="fluentbit.conf" FindPattern="OPENSEARCH_SCHEME" ReplacePattern="[OPENSEARCH_SCHEME]" Options="2" Order="3" FileEncoding="-1"/>
<ROW Name="ReplaceIndex" TxtUpdateSet="fluentbit.conf" FindPattern="OPENSEARCH_INDEX" ReplacePattern="[OPENSEARCH_INDEX]" Options="2" Order="4" FileEncoding="-1"/>
<ROW Name="Append/Create" TxtUpdateSet="htpasswd_dashboards" FindPattern="onlyoffice:[DASHBOARDS_PWD]" Options="160" Order="0" FileEncoding="0"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.TxtUpdateSetComponent">
<ROW Key="YourFile.txt" Component="conf" FileName="onlyoffice.conf" Directory="conf_Dir" Options="17"/>
@ -1594,7 +1601,8 @@
<ROW Key="YourFile.txt_2" Component="includes" FileName="onlyoffice-public.conf" Directory="includes_Dir" Options="17"/>
<ROW Key="YourFile.txt_3" Component="conf" FileName="onlyoffice-proxy*" Directory="conf_Dir" Options="17"/>
<ROW Key="YourFile.txt_5" Component="includes" FileName="letsencrypt.conf" Directory="includes_Dir" Options="17"/>
<ROW Key="fluentbit.conf" Component="APPDIR" FileName="fluent-bit.conf" Directory="APPDIR" Options="17"/>
<ROW Key="fluentbit.conf" Component="config" FileName="fluent-bit.conf" Directory="config_Dir" Options="17"/>
<ROW Key="htpasswd_dashboards" Component="conf" FileName=".htpasswd_dashboards" Directory="conf_Dir" Options="17"/>
<ROW Key="xml" Component="tools" FileName="*.xml" Directory="tools_Dir" Options="17"/>
</COMPONENT>
<COMPONENT cid="caphyon.advinst.msicomp.XmlAttributeComponent">

View File

@ -50,6 +50,7 @@ copy "buildtools\install\docker\config\nginx\onlyoffice-proxy.conf" "buildtools\
copy "buildtools\install\docker\config\nginx\onlyoffice-proxy-ssl.conf" "buildtools\install\win\Files\nginx\conf\onlyoffice-proxy-ssl.conf.tmpl" /y
copy "buildtools\install\docker\config\nginx\letsencrypt.conf" "buildtools\install\win\Files\nginx\conf\includes\letsencrypt.conf" /y
copy "buildtools\install\win\sbin\docspace-ssl-setup.ps1" "buildtools\install\win\Files\sbin\docspace-ssl-setup.ps1" /y
copy "buildtools\install\docker\config\fluent-bit.conf" "buildtools\install\win\Files\config\fluent-bit.conf" /y
rmdir buildtools\install\win\publish /s /q
REM echo ######## SSL configs ########
@ -59,6 +60,13 @@ REM echo ######## SSL configs ########
%sed% -i "s/ssl_dhparam \/etc\/ssl\/certs\/dhparam.pem;/#ssl_dhparam \/etc\/ssl\/certs\/dhparam.pem;/" buildtools\install\win\Files\nginx\conf\onlyoffice-proxy-ssl.conf.tmpl
%sed% -i "s_\(.*root\).*;_\1 \"{APPDIR}letsencrypt\";_g" -i buildtools\install\win\Files\nginx\conf\includes\letsencrypt.conf
%sed% -i "s#/etc/nginx/html#conf/html#g" buildtools\install\win\Files\nginx\conf\onlyoffice.conf
%sed% -i "s/\/etc\/nginx\/\.htpasswd_dashboards/\.htpasswd_dashboards/g" buildtools\install\win\Files\nginx\conf\onlyoffice.conf
REM echo ######## Configure fluent-bit config for windows ########
%sed% -i "s/forward/tail/" buildtools\install\win\Files\config\fluent-bit.conf
%sed% -i "s/Port/Path/" buildtools\install\win\Files\config\fluent-bit.conf
%sed% -i "s/24224/{APPDIR}Logs\*.log/" buildtools\install\win\Files\config\fluent-bit.conf
%sed% -i "/Listen\s*127\.0\.0\.1/d" buildtools\install\win\Files\config\fluent-bit.conf
REM echo ######## Delete test and dev configs ########
del /f /q buildtools\install\win\Files\config\*.test.json

View File

@ -118,6 +118,13 @@ Function SetDocumentServerJWTSecretProp
End Function
Function SetDashboardsPwd
On Error Resume Next
Session.Property("DASHBOARDS_PWD") = RandomString( 20 )
End Function
Function SetMACHINEKEY
On Error Resume Next
@ -394,6 +401,20 @@ Function OpenSearchSetup
fileContent = oRE.Replace(fileContent, "opensearch.hosts: [http://localhost:9200]")
End if
If InStrRev(fileContent, "server.host") = 0 Then
fileContent = fileContent & Chr(13) & Chr(10) & "server.host: 127.0.0.1"
Else
oRE.Pattern = "server.host:.*"
fileContent = oRE.Replace(fileContent, "server.host: 127.0.0.1")
End if
If InStrRev(fileContent, "server.basePath") = 0 Then
fileContent = fileContent & Chr(13) & Chr(10) & "server.basePath: /dashboards"
Else
oRE.Pattern = "server.basePath:.*"
fileContent = oRE.Replace(fileContent, "server.basePath: /dashboards")
End if
Set objFile = objFSO.OpenTextFile(OPENSEARCH_DASHBOARDS_YML, ForWriting)
objFile.WriteLine fileContent
@ -548,7 +569,7 @@ Function MoveConfigs
configSslFile = targetFolder & "\onlyoffice-proxy-ssl.conf.tmpl"
configFile = targetFolder & "\onlyoffice-proxy.conf"
sslScriptPath = Session.Property("APPDIR") & "sbin\docspace-ssl-setup.ps1"
FluentBitSourceFile = Session.Property("APPDIR") & "fluent-bit.conf"
FluentBitSourceFile = Session.Property("APPDIR") & "config\fluent-bit.conf"
FluentBitDstFolder = "C:\OpenSearchStack\fluent-bit-2.2.2-win64\conf\"
' Read content and extract SSL certificate and key paths if it exists