Merge branch 'release/v2.5.0' into develop
This commit is contained in:
commit
a2f371d197
@ -127,7 +127,7 @@
|
||||
"url": "/socket.io",
|
||||
"internal": "http://localhost:9899/"
|
||||
},
|
||||
"cultures": "az,bg,cs,de,el-GR,en-GB,en-US,es,fi,fr,hy-AM,it,lv,nl,pl,pt,pt-BR,ro,ru,sk,sl,vi,tr,uk-UA,ar-SA,lo-LA,ja-JP,zh-CN,ko-KR",
|
||||
"cultures": "az,bg,cs,de,el-GR,en-GB,en-US,es,fi,fr,hy-AM,it,lv,nl,pl,pt,pt-BR,ro,ru,sk,sl,sr-Latn-RS,vi,tr,uk-UA,ar-SA,lo-LA,ja-JP,zh-CN,ko-KR",
|
||||
"controlpanel": {
|
||||
"url": ""
|
||||
},
|
||||
|
@ -157,6 +157,19 @@ server {
|
||||
|
||||
}
|
||||
|
||||
location ^~ /dashboards/ {
|
||||
auth_basic "Restricted Access";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd_dashboards;
|
||||
|
||||
rewrite ^/dashboards(/.*)$ $1 break;
|
||||
proxy_pass http://127.0.0.1:5601;
|
||||
proxy_redirect off;
|
||||
proxy_buffering off;
|
||||
|
||||
proxy_set_header Connection "Keep-Alive";
|
||||
proxy_set_header Proxy-Connection "Keep-Alive";
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:5001;
|
||||
proxy_redirect off;
|
||||
|
@ -13,6 +13,7 @@ RES_APP_CHECK_PORTS="uses ports"
|
||||
RES_CHECK_PORTS="please, make sure that the ports are free.";
|
||||
RES_INSTALL_SUCCESS="Thank you for installing ONLYOFFICE ${product_name}.";
|
||||
RES_QUESTIONS="In case you have any questions contact us via http://support.onlyoffice.com or visit our forum at http://forum.onlyoffice.com"
|
||||
INSTALL_FLUENT_BIT="true"
|
||||
|
||||
while [ "$1" != "" ]; do
|
||||
case $1 in
|
||||
@ -53,6 +54,27 @@ while [ "$1" != "" ]; do
|
||||
fi
|
||||
;;
|
||||
|
||||
-ifb | --installfluentbit )
|
||||
if [ "$2" != "" ]; then
|
||||
INSTALL_FLUENT_BIT=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-du | --dashboadrsusername )
|
||||
if [ "$2" != "" ]; then
|
||||
DASHBOARDS_USERNAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-dp | --dashboadrspassword )
|
||||
if [ "$2" != "" ]; then
|
||||
DASHBOARDS_PASSWORD=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-ls | --localscripts )
|
||||
if [ "$2" != "" ]; then
|
||||
LOCAL_SCRIPTS=$2
|
||||
@ -89,6 +111,9 @@ while [ "$1" != "" ]; do
|
||||
echo " -je, --jwtenabled specifies the enabling the JWT validation (true|false)"
|
||||
echo " -jh, --jwtheader defines the http header that will be used to send the JWT"
|
||||
echo " -js, --jwtsecret defines the secret key to validate the JWT in the request"
|
||||
echo " -ifb, --installfluentbit install or update fluent-bit (true|false)"
|
||||
echo " -du, --dashboadrsusername login for authorization in /dashboards/"
|
||||
echo " -dp, --dashboadrspassword password for authorization in /dashboards/"
|
||||
echo " -ls, --local_scripts use 'true' to run local scripts (true|false)"
|
||||
echo " -skiphc, --skiphardwarecheck use to skip hardware check (true|false)"
|
||||
echo " -ms, --makeswap make swap file (true|false)"
|
||||
|
@ -85,7 +85,7 @@ elif [ "$UPDATE" = "true" ] && [ "$PRODUCT_INSTALLED" = "true" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
hold_package_version dotnet-host opensearch redis-server rabbitmq-server
|
||||
hold_package_version dotnet-host opensearch redis-server rabbitmq-server opensearch-dashboards fluent-bit
|
||||
|
||||
if [ "$MAKESWAP" == "true" ]; then
|
||||
make_swap
|
||||
|
@ -36,6 +36,13 @@ curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --dear
|
||||
echo "deb [signed-by=/usr/share/keyrings/opensearch-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main" >> /etc/apt/sources.list.d/opensearch-2.x.list
|
||||
ELASTIC_VERSION="2.11.1"
|
||||
|
||||
#add opensearch dashboards repo
|
||||
if [ ${INSTALL_FLUENT_BIT} == "true" ]; then
|
||||
curl -o- https://artifacts.opensearch.org/publickeys/opensearch.pgp | gpg --dearmor --batch --yes -o /usr/share/keyrings/opensearch-keyring
|
||||
echo "deb [signed-by=/usr/share/keyrings/opensearch-keyring] https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/2.x/apt stable main" >> /etc/apt/sources.list.d/opensearch-dashboards-2.x.list
|
||||
DASHBOARDS_VERSION="2.11.1"
|
||||
fi
|
||||
|
||||
# add nodejs repo
|
||||
NODE_VERSION="18"
|
||||
curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash -
|
||||
@ -124,6 +131,11 @@ if ! dpkg -l | grep -q "opensearch"; then
|
||||
apt-get install -yq opensearch=${ELASTIC_VERSION}
|
||||
fi
|
||||
|
||||
if [ ${INSTALL_FLUENT_BIT} == "true" ]; then
|
||||
apt-get install -yq opensearch-dashboards=${DASHBOARDS_VERSION}
|
||||
curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh
|
||||
fi
|
||||
|
||||
# disable apparmor for mysql
|
||||
if which apparmor_parser && [ ! -f /etc/apparmor.d/disable/usr.sbin.mysqld ] && [ -f /etc/apparmor.d/disable/usr.sbin.mysqld ]; then
|
||||
ln -sf /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/;
|
||||
|
@ -60,6 +60,7 @@ INSTALL_RABBITMQ="true";
|
||||
INSTALL_MYSQL_SERVER="true";
|
||||
INSTALL_DOCUMENT_SERVER="true";
|
||||
INSTALL_ELASTICSEARCH="true";
|
||||
INSTALL_FLUENT_BIT="true";
|
||||
INSTALL_PRODUCT="true";
|
||||
UPDATE="false";
|
||||
|
||||
@ -372,6 +373,13 @@ while [ "$1" != "" ]; do
|
||||
fi
|
||||
;;
|
||||
|
||||
-ifb | --installfluentbit )
|
||||
if [ "$2" != "" ]; then
|
||||
INSTALL_FLUENT_BIT=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-rdsh | --redishost )
|
||||
if [ "$2" != "" ]; then
|
||||
REDIS_HOST=$2
|
||||
@ -463,6 +471,20 @@ while [ "$1" != "" ]; do
|
||||
fi
|
||||
;;
|
||||
|
||||
-du | --dashboadrsusername )
|
||||
if [ "$2" != "" ]; then
|
||||
DASHBOARDS_USERNAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-dp | --dashboadrspassword )
|
||||
if [ "$2" != "" ]; then
|
||||
DASHBOARDS_PASSWORD=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-noni | --noninteractive )
|
||||
if [ "$2" != "" ]; then
|
||||
NON_INTERACTIVE=$2
|
||||
@ -496,6 +518,9 @@ while [ "$1" != "" ]; do
|
||||
echo " -irds, --installredis install or update redis (true|false)"
|
||||
echo " -imysql, --installmysql install or update mysql (true|false)"
|
||||
echo " -ies, --installelastic install or update elasticsearch (true|false)"
|
||||
echo " -ifb, --installfluentbit install or update fluent-bit (true|false)"
|
||||
echo " -du, --dashboadrsusername login for authorization in /dashboards/"
|
||||
echo " -dp, --dashboadrspassword password for authorization in /dashboards/"
|
||||
echo " -espr, --elasticprotocol the protocol for the connection to elasticsearch (default value http)"
|
||||
echo " -esh, --elastichost the IP address or hostname of the elasticsearch"
|
||||
echo " -esp, --elasticport elasticsearch port number (default value 9200)"
|
||||
@ -1137,6 +1162,9 @@ set_docspace_params() {
|
||||
RABBIT_PASSWORD=${RABBIT_PASSWORD:-$(get_env_parameter "RABBIT_PASSWORD" "${CONTAINER_NAME}")};
|
||||
RABBIT_VIRTUAL_HOST=${RABBIT_VIRTUAL_HOST:-$(get_env_parameter "RABBIT_VIRTUAL_HOST" "${CONTAINER_NAME}")};
|
||||
|
||||
DASHBOARDS_USERNAME=${DASHBOARDS_USERNAME:-$(get_env_parameter "DASHBOARDS_USERNAME" "${CONTAINER_NAME}")};
|
||||
DASHBOARDS_PASSWORD=${DASHBOARDS_PASSWORD:-$(get_env_parameter "DASHBOARDS_PASSWORD" "${CONTAINER_NAME}")};
|
||||
|
||||
CERTIFICATE_PATH=${CERTIFICATE_PATH:-$(get_env_parameter "CERTIFICATE_PATH")};
|
||||
CERTIFICATE_KEY_PATH=${CERTIFICATE_KEY_PATH:-$(get_env_parameter "CERTIFICATE_KEY_PATH")};
|
||||
DHPARAM_PATH=${DHPARAM_PATH:-$(get_env_parameter "DHPARAM_PATH")};
|
||||
@ -1285,6 +1313,38 @@ install_elasticsearch () {
|
||||
fi
|
||||
}
|
||||
|
||||
install_fluent_bit () {
|
||||
if [ "$INSTALL_FLUENT_BIT" == "true" ]; then
|
||||
curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | sh
|
||||
|
||||
if systemctl list-unit-files --type=service | grep -q "fluent-bit.service"; then
|
||||
sed -i "s/OPENSEARCH_SCHEME/$(get_env_parameter "ELK_SHEME")/g" "${BASE_DIR}/config/fluent-bit.conf"
|
||||
sed -i "s/OPENSEARCH_HOST/${ELK_HOST:-127.0.0.1}/g" "${BASE_DIR}/config/fluent-bit.conf"
|
||||
sed -i "s/OPENSEARCH_PORT/$(get_env_parameter "ELK_PORT")/g" ${BASE_DIR}/config/fluent-bit.conf
|
||||
sed -i "s/OPENSEARCH_INDEX/${OPENSEARCH_INDEX:-"${PACKAGE_SYSNAME}-fluent-bit"}/g" ${BASE_DIR}/config/fluent-bit.conf
|
||||
[ ! -z "${ELK_HOST}" ] && sed -i "s/ELK_CONTAINER_NAME/ELK_HOST/g" ${BASE_DIR}/dashboards.yml
|
||||
cp -rf ${BASE_DIR}/config/fluent-bit.conf /etc/fluent-bit/fluent-bit.conf
|
||||
systemctl restart fluent-bit
|
||||
|
||||
DOCKER_DAEMON_FILE="/etc/docker/daemon.json"
|
||||
if [[ ! -f "${DOCKER_DAEMON_FILE}" ]]; then
|
||||
echo "{\"log-driver\": \"fluentd\", \"log-opts\": { \"fluentd-address\": \"127.0.0.1:24224\" }}" > "${DOCKER_DAEMON_FILE}"
|
||||
systemctl restart docker
|
||||
elif ! grep -q "log-driver" ${DOCKER_DAEMON_FILE}; then
|
||||
sed -i 's!{!& "log-driver": "fluentd", "log-opts": { "fluentd-address": "127.0.0.1:24224" },!' "${DOCKER_DAEMON_FILE}"
|
||||
systemctl restart docker
|
||||
fi
|
||||
|
||||
reconfigure DASHBOARDS_USERNAME "${DASHBOARDS_USERNAME:-"onlyoffice"}"
|
||||
reconfigure DASHBOARDS_PASSWORD "${DASHBOARDS_PASSWORD:-$(get_random_str 20)}"
|
||||
|
||||
docker-compose -f ${BASE_DIR}/dashboards.yml up -d
|
||||
else
|
||||
echo "The installation of the fluent-bit service was unsuccessful."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
install_product () {
|
||||
DOCKER_TAG="${DOCKER_TAG:-$(get_available_version ${IMAGE_NAME})}"
|
||||
reconfigure DOCKER_TAG ${DOCKER_TAG}
|
||||
@ -1402,15 +1462,17 @@ start_installation () {
|
||||
|
||||
download_files
|
||||
|
||||
install_elasticsearch
|
||||
|
||||
install_fluent_bit
|
||||
|
||||
install_mysql_server
|
||||
|
||||
install_document_server
|
||||
|
||||
install_rabbitmq
|
||||
|
||||
install_redis
|
||||
|
||||
install_elasticsearch
|
||||
install_document_server
|
||||
|
||||
install_product
|
||||
|
||||
|
@ -14,6 +14,7 @@ RES_CHECK_PORTS="please, make sure that the ports are free.";
|
||||
RES_INSTALL_SUCCESS="Thank you for installing ONLYOFFICE ${product_name}.";
|
||||
RES_QUESTIONS="In case you have any questions contact us via http://support.onlyoffice.com or visit our forum at http://forum.onlyoffice.com"
|
||||
RES_MARIADB="To continue the installation, you need to remove MariaDB"
|
||||
INSTALL_FLUENT_BIT="true"
|
||||
|
||||
res_unsupported_version () {
|
||||
RES_CHOICE="Please, enter Y or N"
|
||||
@ -62,6 +63,27 @@ while [ "$1" != "" ]; do
|
||||
fi
|
||||
;;
|
||||
|
||||
-ifb | --installfluentbit )
|
||||
if [ "$2" != "" ]; then
|
||||
INSTALL_FLUENT_BIT=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-du | --dashboadrsusername )
|
||||
if [ "$2" != "" ]; then
|
||||
DASHBOARDS_USERNAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-dp | --dashboadrspassword )
|
||||
if [ "$2" != "" ]; then
|
||||
DASHBOARDS_PASSWORD=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-ls | --localscripts )
|
||||
if [ "$2" != "" ]; then
|
||||
LOCAL_SCRIPTS=$2
|
||||
@ -98,6 +120,9 @@ while [ "$1" != "" ]; do
|
||||
echo " -je, --jwtenabled specifies the enabling the JWT validation (true|false)"
|
||||
echo " -jh, --jwtheader defines the http header that will be used to send the JWT"
|
||||
echo " -js, --jwtsecret defines the secret key to validate the JWT in the request"
|
||||
echo " -ifb, --installfluentbit install or update fluent-bit (true|false)"
|
||||
echo " -du, --dashboadrsusername login for authorization in /dashboards/"
|
||||
echo " -dp, --dashboadrspassword password for authorization in /dashboards/"
|
||||
echo " -ls, --local_scripts use 'true' to run local scripts (true|false)"
|
||||
echo " -skiphc, --skiphardwarecheck use to skip hardware check (true|false)"
|
||||
echo " -ms, --makeswap make swap file (true|false)"
|
||||
|
@ -69,6 +69,12 @@ fi
|
||||
curl -SL https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/opensearch-2.x.repo -o /etc/yum.repos.d/opensearch-2.x.repo
|
||||
ELASTIC_VERSION="2.11.1"
|
||||
|
||||
#add opensearch dashboards repo
|
||||
if [ ${INSTALL_FLUENT_BIT} == "true" ]; then
|
||||
curl -SL https://artifacts.opensearch.org/releases/bundle/opensearch-dashboards/2.x/opensearch-dashboards-2.x.repo -o /etc/yum.repos.d/opensearch-dashboards-2.x.repo
|
||||
DASHBOARDS_VERSION="2.11.1"
|
||||
fi
|
||||
|
||||
# add nginx repo, Fedora doesn't need it
|
||||
if [ "$DIST" != "fedora" ]; then
|
||||
cat > /etc/yum.repos.d/nginx.repo <<END
|
||||
@ -101,6 +107,12 @@ ${package_manager} -y install $([ $DIST != "fedora" ] && echo "epel-release") \
|
||||
expect \
|
||||
ffmpeg $TESTING_REPO
|
||||
|
||||
#add repo, install fluent-bit
|
||||
if [ ${INSTALL_FLUENT_BIT} == "true" ]; then
|
||||
curl https://raw.githubusercontent.com/fluent/fluent-bit/master/install.sh | bash
|
||||
${package_manager} -y install opensearch-dashboards-${DASHBOARDS_VERSION} --enablerepo=opensearch-dashboards-2.x
|
||||
fi
|
||||
|
||||
if [[ $PSQLExitCode -eq $UPDATE_AVAILABLE_CODE ]]; then
|
||||
yum -y install postgresql-upgrade
|
||||
postgresql-setup --upgrade || true
|
||||
|
@ -26,6 +26,7 @@ APP_PORT="80"
|
||||
ELK_SHEME="http"
|
||||
ELK_HOST="localhost"
|
||||
ELK_PORT="9200"
|
||||
OPENSEARCH_INDEX="${PACKAGE_SYSNAME}-${PRODUCT}-logs"
|
||||
|
||||
RABBITMQ_HOST="localhost"
|
||||
RABBITMQ_USER="guest"
|
||||
@ -179,6 +180,20 @@ while [ "$1" != "" ]; do
|
||||
fi
|
||||
;;
|
||||
|
||||
-du | --dashboadrsusername )
|
||||
if [ "$2" != "" ]; then
|
||||
DASHBOARDS_USERNAME=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-dp | --dashboadrspassword )
|
||||
if [ "$2" != "" ]; then
|
||||
DASHBOARDS_PASSWORD=$2
|
||||
shift
|
||||
fi
|
||||
;;
|
||||
|
||||
-docsurl | --docsurl )
|
||||
if [ "$2" != "" ]; then
|
||||
DOCUMENT_SERVER_URL_EXTERNAL=$2
|
||||
@ -496,6 +511,7 @@ setup_openresty(){
|
||||
if [ -f /etc/nginx/nginx.conf ]; then
|
||||
if grep -q "server {" /etc/nginx/nginx.conf ; then
|
||||
sed -e '$a}' -e '/server {/,$d' -i /etc/nginx/nginx.conf
|
||||
systemctl reload nginx
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -706,6 +722,40 @@ setup_elasticsearch() {
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
setup_dashboards() {
|
||||
echo -n "Configuring dashboards... "
|
||||
|
||||
DASHBOARDS_CONF_PATH="/etc/opensearch-dashboards/opensearch_dashboards.yml"
|
||||
|
||||
# configure login&pass for Dashboards, used by Nginx HTTP Basic Authentication
|
||||
echo "${DASHBOARDS_USERNAME:-"onlyoffice"}:$(openssl passwd -6 -stdin <<< "${DASHBOARDS_PASSWORD:-"onlyoffice"}")" > /etc/openresty/.htpasswd_dashboards
|
||||
chown nginx:nginx /etc/openresty/.htpasswd_dashboards
|
||||
|
||||
# enable connection with opensearch
|
||||
sed -i 's~\(opensearch\.hosts:\).*~\1 \[http://localhost:9200\]~' ${DASHBOARDS_CONF_PATH}
|
||||
sed -i '/^opensearch\_security/d' ${DASHBOARDS_CONF_PATH}
|
||||
if /usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin list --allow-root | grep "securityDashboards*" > /dev/null 2>&1 ; then
|
||||
/usr/share/opensearch-dashboards/bin/opensearch-dashboards-plugin remove securityDashboards --allow-root > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
# set basePath variable to get access to Dashboards from a remote host
|
||||
sed 's_.*\(server.basePath:\).*_\1 "/dashboards"_' -i ${DASHBOARDS_CONF_PATH}
|
||||
|
||||
systemctl restart opensearch-dashboards
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
setup_fluentbit() {
|
||||
echo -n "Configuring fluent-bit... "
|
||||
|
||||
# Replace variables in fluent-bit config file template, force copy to conf directory
|
||||
sed -i "s/OPENSEARCH_HOST/$ELK_HOST/g; s/OPENSEARCH_PORT/$ELK_PORT/g; s/OPENSEARCH_INDEX/$OPENSEARCH_INDEX/g; s/OPENSEARCH_SCHEME/$ELK_SHEME/g" ${APP_DIR}/fluent-bit.conf
|
||||
cp -f ${APP_DIR}/fluent-bit.conf /etc/fluent-bit/fluent-bit.conf
|
||||
|
||||
systemctl restart fluent-bit
|
||||
echo "OK"
|
||||
}
|
||||
|
||||
setup_redis() {
|
||||
echo -n "Configuring redis... "
|
||||
|
||||
@ -822,6 +872,14 @@ elif $PACKAGE_MANAGER opensearch >/dev/null 2>&1; then
|
||||
setup_elasticsearch "LOCAL_ELASTIC_SERVER"
|
||||
fi
|
||||
|
||||
if $PACKAGE_MANAGER opensearch-dashboards >/dev/null 2>&1; then
|
||||
setup_dashboards
|
||||
fi
|
||||
|
||||
if $PACKAGE_MANAGER fluent-bit >/dev/null 2>&1; then
|
||||
setup_fluentbit
|
||||
fi
|
||||
|
||||
if [[ ! -z $EXTERNAL_REDIS_FLAG ]]; then
|
||||
check_connection_external_services "$REDIS_HOST" "$REDIS_PORT" "Redis"
|
||||
setup_redis "EXTERNAL_REDIS_SERVER"
|
||||
|
@ -2,3 +2,4 @@ debian/build/buildtools/config/*.json etc/onlyo
|
||||
debian/build/buildtools/config/*.config etc/onlyoffice/{{product}}
|
||||
debian/build/buildtools/install/common/{{product}}-configuration usr/bin
|
||||
debian/build/buildtools/install/common/logrotate/{{product}}-common etc/logrotate.d
|
||||
debian/build/buildtools/install/docker/config/fluent-bit.conf etc/onlyoffice/{{product}}
|
||||
|
@ -76,6 +76,7 @@ override_dh_auto_build: check_archives
|
||||
|
||||
sed -e 's_etc/nginx_etc/openresty_g' -e 's/listen\s\+\([0-9]\+\);/listen 127.0.0.1:\1;/g' -i ${BUILDTOOLS_PATH}/config/nginx/*.conf
|
||||
sed -i "s#\$$public_root#/var/www/${PRODUCT}/public/#g" ${BUILDTOOLS_PATH}/config/nginx/onlyoffice.conf
|
||||
sed -E 's_(http://)[^:]+(:5601)_\1localhost\2_g' -i ${BUILDTOOLS_PATH}/config/nginx/onlyoffice.conf
|
||||
sed 's/teamlab.info/onlyoffice.com/g' -i ${BUILDTOOLS_PATH}/config/autofac.consumers.json
|
||||
json -I -f ${CLENT_PATH}/public/scripts/config.json -e "this.wrongPortalNameUrl=\"\""
|
||||
sed -e 's/$$router_host/127.0.0.1/g' -e 's/this_host\|proxy_x_forwarded_host/host/g' -e 's/proxy_x_forwarded_proto/scheme/g' -e 's/proxy_x_forwarded_port/server_port/g' -e 's_includes_/etc/openresty/includes_g' -i ${BUILDTOOLS_PATH}/install/docker/config/nginx/onlyoffice-proxy*.conf
|
||||
@ -83,6 +84,8 @@ override_dh_auto_build: check_archives
|
||||
sed -e '/.pid/d' -e '/temp_path/d' -e 's_etc/nginx_etc/openresty_g' -e 's/\.log/-openresty.log/g' -i ${BUILDTOOLS_PATH}/install/docker/config/nginx/templates/nginx.conf.template
|
||||
mv -f ${BUILDTOOLS_PATH}/install/docker/config/nginx/onlyoffice-proxy-ssl.conf ${BUILDTOOLS_PATH}/install/docker/config/nginx/onlyoffice-proxy-ssl.conf.template
|
||||
cp -rf ${BUILDTOOLS_PATH}/install/docker/config/nginx/onlyoffice-proxy.conf ${BUILDTOOLS_PATH}/install/docker/config/nginx/onlyoffice-proxy.conf.template
|
||||
sed -i '/^\s*Name\s\+forward\s*/d; /^\s*Listen\s\+127\.0\.0\.1\s*/d; /^\s*Port\s\+24224\s*/d' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
|
||||
sed -i '0,/\[INPUT\]/ s/\(\[INPUT\]\)/\1\n Name tail\n Path \/var\/log\/onlyoffice\/${PRODUCT}\/*.log\n Path_Key filename/' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
|
||||
|
||||
for i in ${PRODUCT} $$(ls ${CURDIR}/debian/*.install | grep -oP 'debian/\K.*' | grep -o '^[^.]*'); do \
|
||||
cp ${CURDIR}/debian/source/lintian-overrides ${CURDIR}/debian/$$i.lintian-overrides; \
|
||||
|
@ -8,18 +8,22 @@
|
||||
CONTAINER_PREFIX=${PRODUCT}-
|
||||
MYSQL_VERSION=8.3.0
|
||||
MYSQL_IMAGE=mysql:${MYSQL_VERSION}
|
||||
ELK_VERSION=2.11.1
|
||||
SERVICE_PORT=5050
|
||||
DOCUMENT_SERVER_IMAGE_NAME=onlyoffice/4testing-documentserver-ee:latest
|
||||
DOCKERFILE=Dockerfile.app
|
||||
APP_DOTNET_ENV=""
|
||||
EXTERNAL_PORT="80"
|
||||
|
||||
# elasticsearch #
|
||||
# opensearch stack #
|
||||
ELK_VERSION=2.11.1
|
||||
ELK_CONTAINER_NAME=${CONTAINER_PREFIX}opensearch
|
||||
ELK_SHEME=http
|
||||
ELK_HOST=""
|
||||
ELK_PORT=9200
|
||||
DASHBOARDS_VERSION=2.11.1
|
||||
DASHBOARDS_CONTAINER_NAME=${CONTAINER_PREFIX}opensearch-dashboards
|
||||
DASHBOARDS_USERNAME=onlyoffice
|
||||
DASHBOARDS_PASSWORD=onlyoffice
|
||||
|
||||
# app service environment #
|
||||
ENV_EXTENSION=none
|
||||
|
@ -173,6 +173,7 @@ RUN sed -i 's/127.0.0.1:5010/$service_api_system/' /etc/nginx/conf.d/onlyoffice.
|
||||
if [[ -z "${SERVICE_CLIENT}" ]] ; then sed -i 's/127.0.0.1:5001/$service_client/' /etc/nginx/conf.d/onlyoffice.conf; fi && \
|
||||
if [[ -z "${SERVICE_MANAGEMENT}" ]] ; then sed -i 's/127.0.0.1:5015/$service_management/' /etc/nginx/conf.d/onlyoffice.conf; fi && \
|
||||
sed -i 's/127.0.0.1:5033/$service_healthchecks/' /etc/nginx/conf.d/onlyoffice.conf && \
|
||||
sed -i 's/127.0.0.1:5601/$dashboards_host:5601/' /etc/nginx/conf.d/onlyoffice.conf && \
|
||||
sed -i 's/$public_root/\/var\/www\/public\//' /etc/nginx/conf.d/onlyoffice.conf && \
|
||||
sed -i 's/http:\/\/172.*/$document_server;/' /etc/nginx/conf.d/onlyoffice.conf && \
|
||||
sed -i '/client_body_temp_path/ i \ \ \ \ $MAP_HASH_BUCKET_SIZE' /etc/nginx/nginx.conf.template && \
|
||||
|
@ -14,7 +14,7 @@ else
|
||||
echo "Error: yml files not found." && exit 1
|
||||
fi
|
||||
|
||||
FILES=("${PRODUCT}" "notify" "healthchecks" "proxy" "ds" "rabbitmq" "redis" "opensearch" "db")
|
||||
FILES=("${PRODUCT}" "notify" "healthchecks" "proxy" "ds" "rabbitmq" "redis" "opensearch" "dashboards" "db")
|
||||
|
||||
LOG_DIR="${DOCKERCOMPOSE}/logs"
|
||||
mkdir -p ${LOG_DIR}
|
||||
|
25
install/docker/config/fluent-bit.conf
Normal file
25
install/docker/config/fluent-bit.conf
Normal file
@ -0,0 +1,25 @@
|
||||
[SERVICE]
|
||||
Flush 1
|
||||
Log_Level info
|
||||
Daemon off
|
||||
|
||||
[INPUT]
|
||||
Name forward
|
||||
Listen 127.0.0.1
|
||||
Port 24224
|
||||
|
||||
[INPUT]
|
||||
Name exec
|
||||
Interval_Sec 86400
|
||||
Command curl -s -X POST 'OPENSEARCH_SCHEME://OPENSEARCH_HOST:OPENSEARCH_PORT/OPENSEARCH_INDEX/_delete_by_query' -H 'Content-Type: application/json' -d "{\"query\": {\"range\": {\"@timestamp\": {\"lt\": \"$(date -u -d '30 days ago' '+%Y-%m-%dT%H:%M:%S')\"}}}}"
|
||||
|
||||
[OUTPUT]
|
||||
Name opensearch
|
||||
Match *
|
||||
Host OPENSEARCH_HOST
|
||||
Port OPENSEARCH_PORT
|
||||
Replace_Dots On
|
||||
Suppress_Type_Name On
|
||||
Time_Key @timestamp
|
||||
Type _doc
|
||||
Index OPENSEARCH_INDEX
|
@ -83,3 +83,9 @@ map $SERVICE_CLIENT $service_client {
|
||||
"" 127.0.0.1:5001;
|
||||
default $SERVICE_CLIENT;
|
||||
}
|
||||
|
||||
map $DASHBOARDS_CONTAINER_NAME $dashboards_host {
|
||||
volatile;
|
||||
default onlyoffice-opensearch-dashboards;
|
||||
~^(.*)$ $1;
|
||||
}
|
||||
|
17
install/docker/dashboards.yml
Normal file
17
install/docker/dashboards.yml
Normal file
@ -0,0 +1,17 @@
|
||||
version: "3"
|
||||
services:
|
||||
onlyoffice-opensearch-dashboards:
|
||||
image: opensearchproject/opensearch-dashboards:${DASHBOARDS_VERSION}
|
||||
container_name: ${DASHBOARDS_CONTAINER_NAME}
|
||||
restart: always
|
||||
environment:
|
||||
- OPENSEARCH_HOSTS=${ELK_SHEME}://${ELK_CONTAINER_NAME}:${ELK_PORT}
|
||||
- "DISABLE_SECURITY_DASHBOARDS_PLUGIN=true"
|
||||
- "SERVER_BASEPATH=/dashboards"
|
||||
expose:
|
||||
- "5601"
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${NETWORK_NAME}
|
||||
external: true
|
@ -279,6 +279,7 @@ services:
|
||||
- REDIS_HOST=${REDIS_HOST}
|
||||
- REDIS_PORT=${REDIS_PORT}
|
||||
- SERVICE_PORT=${SERVICE_PORT}
|
||||
- DASHBOARDS_CONTAINER_NAME=${DASHBOARDS_CONTAINER_NAME}
|
||||
volumes:
|
||||
- router_log:/var/log/nginx
|
||||
|
||||
|
@ -223,6 +223,9 @@ services:
|
||||
- REDIS_PORT=${REDIS_PORT}
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
- SERVICE_PORT=${SERVICE_PORT}
|
||||
- DASHBOARDS_CONTAINER_NAME=${DASHBOARDS_CONTAINER_NAME}
|
||||
- DASHBOARDS_USERNAME=${DASHBOARDS_USERNAME}
|
||||
- DASHBOARDS_PASSWORD=${DASHBOARDS_PASSWORD}
|
||||
volumes:
|
||||
- router_log:/var/log/nginx
|
||||
|
||||
|
@ -23,6 +23,9 @@ services:
|
||||
expose:
|
||||
- "9200"
|
||||
- "9600" # required for Performance Analyzer
|
||||
ports:
|
||||
- 127.0.0.1:9200:9200
|
||||
|
||||
networks:
|
||||
default:
|
||||
name: ${NETWORK_NAME}
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
WRONG_PORTAL_NAME_URL=${WRONG_PORTAL_NAME_URL:-""}
|
||||
REDIS_HOST=${REDIS_HOST:-"${REDIS_CONTAINER_NAME}"}
|
||||
REDIS_PORT=${REDIS_PORT:-"6379"}
|
||||
@ -9,3 +9,4 @@ sed -i "s~\(redis_host =\).*~\1 \"$REDIS_HOST\"~" /etc/nginx/conf.d/onlyoffice.c
|
||||
sed -i "s~\(redis_port =\).*~\1 $REDIS_PORT~" /etc/nginx/conf.d/onlyoffice.conf
|
||||
sed -i "s~\(redis_pass =\).*~\1 \"$REDIS_PASSWORD\"~" /etc/nginx/conf.d/onlyoffice.conf
|
||||
sed -i "s~\(\"wrongPortalNameUrl\":\).*,~\1 \"${WRONG_PORTAL_NAME_URL}\",~g" /var/www/public/scripts/config.json
|
||||
echo "${DASHBOARDS_USERNAME:-onlyoffice}:$(openssl passwd -6 -stdin <<< "${DASHBOARDS_PASSWORD:-onlyoffice}")" > /etc/nginx/.htpasswd_dashboards
|
||||
|
@ -26,9 +26,12 @@ sed 's/teamlab.info/onlyoffice.com/g' -i config/autofac.consumers.json
|
||||
|
||||
sed -e 's_etc/nginx_etc/openresty_g' -e 's/listen\s\+\([0-9]\+\);/listen 127.0.0.1:\1;/g' -i config/nginx/*.conf
|
||||
sed -i "s#\$public_root#/var/www/%{product}/public/#g" config/nginx/onlyoffice.conf
|
||||
sed -E 's_(http://)[^:]+(:5601)_\1localhost\2_g' -i config/nginx/onlyoffice.conf
|
||||
sed -e 's/$router_host/127.0.0.1/g' -e 's/this_host\|proxy_x_forwarded_host/host/g' -e 's/proxy_x_forwarded_proto/scheme/g' -e 's/proxy_x_forwarded_port/server_port/g' -e 's_includes_/etc/openresty/includes_g' -i install/docker/config/nginx/onlyoffice-proxy*.conf
|
||||
sed -e '/.pid/d' -e '/temp_path/d' -e 's_etc/nginx_etc/openresty_g' -e 's/\.log/-openresty.log/g' -i install/docker/config/nginx/templates/nginx.conf.template
|
||||
sed -i "s_\(.*root\).*;_\1 \"/var/www/%{product}\";_g" -i install/docker/config/nginx/letsencrypt.conf
|
||||
sed -i '/^\s*Name\s\+forward\s*$/d; /^\s*Listen\s\+127\.0\.0\.1\s*$/d; /^\s*Port\s\+24224\s*$/d' -i install/docker/config/fluent-bit.conf
|
||||
sed -i "0,/\[INPUT\]/ s/\(\[INPUT\]\)/\1\n Name tail\n Path \/var\/log\/onlyoffice\/%{product}\/*.log\n Path_Key filename/" -i install/docker/config/fluent-bit.conf
|
||||
|
||||
find %{_builddir}/server/publish/ \
|
||||
%{_builddir}/server/ASC.Migration.Runner \
|
||||
|
@ -35,6 +35,7 @@ mkdir -p "%{buildroot}%{_sysconfdir}/openresty/html/"
|
||||
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/openresty"
|
||||
mkdir -p "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/.private/"
|
||||
mkdir -p "%{buildroot}%{_sysconfdir}/logrotate.d"
|
||||
mkdir -p "%{buildroot}%{_sysconfdir}/fluent-bit/"
|
||||
mkdir -p "%{buildroot}%{_docdir}/%{name}-%{version}-%{release}/"
|
||||
mkdir -p "%{buildroot}%{_bindir}/"
|
||||
cp -rf %{_builddir}/publish/web/public/* "%{buildroot}%{buildpath}/public/"
|
||||
@ -75,3 +76,4 @@ cp -rf %{_builddir}/buildtools/config/nginx/onlyoffice*.conf "%{buildroot}%{_sys
|
||||
cp -rf %{_builddir}/buildtools/config/nginx/includes/onlyoffice*.conf "%{buildroot}%{_sysconfdir}/openresty/includes/"
|
||||
cp -rf %{_builddir}/buildtools/config/nginx/html/*.html "%{buildroot}%{_sysconfdir}/openresty/html/"
|
||||
cp -rf %{_builddir}/buildtools/config/* "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
|
||||
cp -rf %{_builddir}/buildtools/install/docker/config/fluent-bit.conf "%{buildroot}%{_sysconfdir}/onlyoffice/%{product}/"
|
||||
|
Loading…
Reference in New Issue
Block a user