Compare commits

...

88 Commits

Author SHA1 Message Date
e24a554240 Refactoring install-Docker.sh code 2024-07-10 15:33:34 +03:00
723e66f59e Refactoring install-Debian.sh code 2024-07-10 15:33:33 +03:00
e5bfcd8d47 Refactoring install-RedHat.sh code 2024-07-10 15:33:33 +03:00
369cfd8d30 Refactoring docspace-install.sh code 2024-07-10 15:33:33 +03:00
c312ba632b
Feature/oauth2 client (#276) 2024-07-09 16:24:04 +03:00
13f67192bf Rename oauth to identity, add flag for build in dev mode 2024-07-09 15:41:51 +03:00
a9d9ba70a8 added IdentityServer to hide settings 2024-07-09 12:04:49 +03:00
2813bd572f
Separate dashboards location (#259) 2024-07-09 10:22:27 +03:00
1cd5d9a2e9 ASC.Identity: fixed runner 2024-07-04 16:01:28 +03:00
6d0c14ebc3 Fix the .next folder packing for login service 2024-07-01 13:38:51 +03:00
33ac365992 Fix package build substitution errors 2024-07-01 12:17:20 +03:00
9d9e76acb1
fix Bug 68851 - Fix packages conflict for RabbirMQ: mkfontscale (#265) 2024-06-28 18:02:30 +03:00
26f8014056
Fix update of held dependencies (#262) 2024-06-28 17:48:56 +03:00
aff3c13d5c Fix build oauth 2024-06-28 13:36:14 +03:00
58f8ef4d27 Rename dashboards and mentionings to server-dashboards 2024-06-26 00:11:03 +03:00
415fe6e605 Merge branch 'develop' into feature/oauth2-client 2024-06-24 14:31:26 +03:00
3f2087a60c Update docker build for oauth services 2024-06-24 14:15:03 +03:00
5c567ad109 Install:Docker: fix env 2024-06-19 18:13:52 +03:00
f4e91b7b3d Merge branch 'develop' into feature/oauth2-client 2024-06-19 15:16:18 +03:00
Valeria Bagisheva
9f88fc61f0
Brush up some spaces 2024-06-14 17:22:33 +03:00
0cb0448c44 Delete useless 2024-06-14 13:00:35 +03:00
191ab2db6f Merge branch 'develop' into feature/oauth2-client 2024-06-14 12:27:01 +03:00
3545708a25 Nginx: fix for oauth2 2024-05-30 12:14:17 +03:00
5aa3339a6f Run: fix start Login SSR 2024-05-30 10:15:35 +03:00
c959e430f2 Merge branch 'develop' into feature/oauth2-client 2024-05-23 18:42:26 +03:00
dc099c3eb1 Separate dashboards location 2024-05-13 17:01:07 +03:00
bbd4d8013d identity: added LOG_FILE_PATH to startup service 2024-02-19 14:35:04 +03:00
2ee869d9bb identity: added LOG_FILE_PATH to startup service 2024-02-15 19:09:55 +03:00
3d8d1c5e21 oauth2: fixed config 2024-02-12 17:59:00 +03:00
b567e10880 Merge branch 'develop' into feature/oauth2-client 2024-02-12 16:45:54 +03:00
1517c48add Fix oauth build 2024-01-22 11:43:49 +03:00
e248c9d317 Install:Docker: fix build oauth 2023-12-14 10:37:57 +03:00
bbc46c5676 Merge branch 'develop' into feature/oauth2-client 2023-11-29 10:26:01 +03:00
893e3dca78 identity: change path 2023-11-28 20:39:56 +03:00
bb30917778 Buildtools: change ASC.OAuth to ASC.Identity 2023-11-17 15:33:39 +03:00
4a3b1d943e Fix 2023-11-10 16:42:23 +03:00
e1c2632e09 Fix after merge 2023-11-10 13:16:01 +03:00
67821b7297 Merge branch 'develop' into feature/oauth2-client 2023-11-10 12:11:17 +03:00
5edc87293a Merge branch 'develop' into feature/oauth2-client 2023-10-31 10:47:18 +03:00
40d19b1746 Fix nginx oauth config 2023-10-27 12:29:25 +03:00
f745a71e43 Fix nginx; fix build oauth containers 2023-10-25 11:41:13 +03:00
8f0ed06219 Build: fix oauth build 2023-10-23 11:02:31 +03:00
d4efd04825 Fix nginx config and oauth.yml 2023-10-19 18:08:18 +03:00
d8eff9bdb8 identity: added starter for windows 2023-10-19 16:43:09 +03:00
242340255b Merge branch 'develop' into feature/oauth2-client 2023-10-04 15:13:25 +03:00
d7ea6fad02 Merge branch 'develop' into feature/oauth2-client 2023-10-04 13:49:47 +03:00
ad047bc372 Merge branch 'develop' into feature/oauth2-client 2023-10-02 10:05:58 +03:00
e02510be1d Build: Docker: Fixed docker build scripts and .env 2023-09-29 16:50:36 +03:00
bb5b8cccdd Common: OAuth: Migration: Fixed sql script 2023-09-29 16:48:46 +03:00
ba23f9bb7b fixed migration 2023-09-29 14:39:22 +03:00
84afb50b66 merge from develop 2023-09-29 14:28:10 +03:00
aa6545bfe1 Build: add build docker oauth2 services for unix 2023-09-28 17:59:35 +03:00
4b888c6640 Build: add build docker oauth2 services 2023-09-28 17:42:06 +03:00
a34bedef1e Web:Client:OAUth: add preview 2023-09-28 14:36:53 +03:00
f6dca051ac Rename oauth service to oauth_api_service, add new oauth service 2023-09-28 13:26:00 +03:00
ca73c5b0c4 Web:Client:OAuth: add row view 2023-09-28 10:21:43 +03:00
807215a0cb Web:Client:OAuth: fix mobx warning, add infinity list for table view 2023-09-27 18:13:07 +03:00
2381fcf68f chore: remove react client 2023-09-27 18:14:30 +05:00
8ee516850b fix: use server side templates 2023-09-27 18:14:21 +05:00
0f9d61b9f0 fix: server side resources 2023-09-27 18:13:54 +05:00
bbce172bba Move ASC.OAuth from web to common 2023-09-27 14:05:59 +03:00
5f8718c78d Add yarn.lock for ASC.OAuth client 2023-09-27 14:02:16 +03:00
76e439bad3 Merge branch 'feature/oauth2' into feature/oauth2-client 2023-09-27 14:01:10 +03:00
d8a535432d Web:Client:PortalSettings:OAuth: add table view 2023-09-27 14:00:11 +03:00
6956adc231 Web:Client:PortalSettings: fix create and edit oauth client 2023-09-26 11:47:27 +03:00
310f2d5dc5 Web:Client:PortalSettings: add OAuth edit and create page 2023-09-26 10:31:22 +03:00
61c920555b Nginx: fix /api/scopes for OAuth 2023-09-25 17:04:55 +03:00
8b0bca3a44 Web:Client:Routes: fix OAuth create and edit routes 2023-09-25 17:04:30 +03:00
74e94c0a10 Web:Client:Store: rewrite OAuth store to typescipt 2023-09-25 17:03:57 +03:00
dc1274fb88 Web:Client:PortalSettings: add OAuth empty page 2023-09-25 17:03:25 +03:00
3b9c56c5f4 Web:Common:OAuth: add new utils, new interfaces 2023-09-25 17:02:28 +03:00
a56a46236c Web:Client:PortalSettings: add OAuth page 2023-09-25 10:09:24 +03:00
17f6195d8c Merge branch 'develop' into feature/oauth2-client 2023-09-25 08:54:25 +03:00
31bf677340 Merge branch 'develop' into feature/oauth2-client 2023-09-22 17:31:22 +03:00
8e751923d9 Web:OAuth2: add CRUD 2023-09-22 17:28:37 +03:00
ebdffb55ea Update yarn.lock 2023-09-22 15:38:32 +03:00
ac496b82a2 Add oauth service proxy 2023-09-22 15:38:11 +03:00
6d6116c5ce merge from develop 2023-09-22 13:39:24 +03:00
11c322f03b chore: client url 2023-09-13 17:41:05 +05:00
2a36d19707 feat: authorization server 2023-09-13 16:10:28 +05:00
4a7f1710de merge from develop 2023-08-15 19:50:23 +03:00
a4d69eebe8 Web: Client: OAuth: Fixed DTO and client view styles 2023-07-18 12:36:44 +03:00
e173c5932d Web: Client: OAuth: Added view page 2023-07-18 12:36:44 +03:00
fbaace1941 Web: Client: PortalSettings: Fixed OAuth settings page 2023-07-18 12:36:44 +03:00
a0b9e56097 Web: Client: PortalSettings: Added base OAuth page 2023-07-18 12:36:44 +03:00
06c63bdb6f ASC.MigrationPersonalToDocspace: fixed 2023-07-06 19:40:10 +03:00
d5b009554e backend: update JWT dll. Added authorize via JWT token 2023-06-29 20:47:47 +03:00
eefb4b5e2e refactoring:Authorization replace mvc filter to route 2023-06-16 19:46:14 +03:00
30 changed files with 655 additions and 996 deletions

View File

@ -11,13 +11,14 @@ def help():
# Display Help
print("Build and run backend and working environment. (Use 'yarn start' to run client -> https://github.com/ONLYOFFICE/DocSpace-client)")
print()
print("Syntax: available params [-h|f|s|c|d|]")
print("Syntax: available params [-h|f|s|c|d|i")
print("options:")
print("h Print this Help.")
print("f Force rebuild base images.")
print("s Run as SAAS otherwise as STANDALONE.")
print("c Run as COMMUNITY otherwise ENTERPRISE.")
print("d Run dnsmasq.")
print("i Run identity (oauth2).")
print()
@ -37,6 +38,8 @@ if local_ip == "127.0.0.1":
doceditor = f"{local_ip}:5013"
login = f"{local_ip}:5011"
client = f"{local_ip}:5001"
identity_auth = f"{local_ip}:8080"
identity_api = f"{local_ip}:9090"
management = f"{local_ip}:5015"
portal_url = f"http://{local_ip}"
@ -44,13 +47,14 @@ force = False
dns = False
standalone = True
community = False
identity = False
migration_type = "STANDALONE" # SAAS
installation_type = "ENTERPRISE"
document_server_image_name = "onlyoffice/documentserver-de:latest"
# Get the options
opts, args = getopt.getopt(sys.argv[1:], "hfscd")
opts, args = getopt.getopt(sys.argv[1:], "hfscdi")
for opt, arg in opts:
if opt == "-h":
help()
@ -63,6 +67,8 @@ for opt, arg in opts:
community = arg if arg else True
elif opt == "-d":
dns = arg if arg else True
elif opt == "-i":
identity = arg if arg else True
else:
print("Error: Invalid '-" + opt + "' option")
sys.exit()
@ -80,6 +86,7 @@ print(f"DOCSPACE_APP_URL: {portal_url}")
print()
print("FORCE REBUILD BASE IMAGES:", force)
print("Run dnsmasq:", dns)
print("Run identity:", identity)
if standalone == False:
migration_type = "SAAS"
@ -182,6 +189,8 @@ os.environ["SERVICE_DOCEDITOR"] = doceditor
os.environ["SERVICE_LOGIN"] = login
os.environ["SERVICE_MANAGEMENT"] = management
os.environ["SERVICE_CLIENT"] = client
os.environ["SERVICE_IDENTITY"] = identity_auth
os.environ["SERVICE_IDENTITY_API"] = identity_api
os.environ["ROOT_DIR"] = dir
os.environ["BUILD_PATH"] = "/var/www"
os.environ["SRC_PATH"] = os.path.join(dir, "publish/services")
@ -190,6 +199,10 @@ os.environ["APP_URL_PORTAL"] = portal_url
os.environ["MIGRATION_TYPE"] = migration_type
subprocess.run(["docker-compose", "-f", os.path.join(dockerDir, "docspace.profiles.yml"), "-f", os.path.join(dockerDir, "docspace.overcome.yml"), "--profile", "migration-runner", "--profile", "backend-local", "up", "-d"])
if identity:
print("Run identity")
subprocess.run(["docker-compose", "-f",os.path.join(dockerDir, "identity.yml"), "up", "-d" ])
print()
print("Run script directory:", dir)
print("Root directory:", dir)

26
build.backend.dotnet.bat Normal file
View File

@ -0,0 +1,26 @@
@echo off
echo Start build backend...
echo.
cd /D "%~dp0"
call runasadmin.bat "%~dpnx0"
if %errorlevel% == 0 (
call start\stop.bat nopause
dotnet build ..\server\asc.web.slnf /fl1 /flp1:logfile=asc.web.log;verbosity=normal
echo.
)
if %errorlevel% == 0 (
call start\start.bat nopause
)
echo.
if "%1"=="nopause" goto end
pause
:end

View File

@ -31,6 +31,10 @@ if containers or images:
db_command = f"docker compose -f {os.path.join(docker_dir, 'db.yml')} down --volumes"
subprocess.run(db_command, shell=True)
print("Remove docker contatiners 'Identity'")
identity_command = f"docker compose -f {os.path.join(docker_dir, 'identity.yml')} down --volumes"
subprocess.run(identity_command, shell=True)
print("Remove docker volumes")
volumes_command = f"docker volume prune -fa"
subprocess.run(volumes_command, shell=True)

View File

@ -38,7 +38,10 @@
},
"themelimit": "9",
"oidc": {
"authority": ""
"authority": "",
"disableValidateToken": "true",
"requireHttps": "false",
"showPII": "true"
},
"server-root": "",
"username": {
@ -122,7 +125,7 @@
"api-system": "",
"api-cache": "",
"images": "static/images",
"hide-settings": "Monitoring,LdapSettings,DocService,MailService,PublicPortal,ProxyHttpContent,SpamSubscription,FullTextSearch",
"hide-settings": "Monitoring,LdapSettings,DocService,MailService,PublicPortal,ProxyHttpContent,SpamSubscription,FullTextSearch,IdentityServer",
"hub": {
"url": "/socket.io",
"internal": "http://localhost:9899/"

View File

@ -9,6 +9,6 @@ server=8.8.4.4
server=8.8.8.8
strict-order
#serve all .company queries using a specific nameserver
server=/site/127.0.0.1
server=/site/192.168.0.18
#explicitly define host-ip mappings
address=/docspace.site/127.0.0.1
address=/docspace.site/192.168.0.18

View File

@ -0,0 +1,12 @@
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";
}

View File

@ -104,7 +104,7 @@ server {
local accept_header = ngx.req.get_headers()["Accept"]
if ngx.req.get_method() == "GET" and accept_header ~= nil and string.find(accept_header, "html") and not ngx.re.match(ngx.var.request_uri, "ds-vpath|/api/") then
if not ngx.re.match(ngx.var.request_uri, "login|thirdparty|confirm|error|wizard|preparation-portal|unavailable|share=.|rooms/share(.*)key=.|/s/*") then
if not ngx.re.match(ngx.var.request_uri, "login|oauth2|thirdparty|confirm|error|wizard|preparation-portal|unavailable|share=.|rooms/share(.*)key=.|/s/*") then
if ngx.var.http_cookie == nil or not string.find(ngx.var.http_cookie, "asc_auth_key") then
if ngx.var.request_uri == "/" then
return ngx.redirect("/login")
@ -168,18 +168,7 @@ 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";
}
include /etc/nginx/includes/server-*.conf;
location / {
proxy_pass http://127.0.0.1:5001;
@ -333,6 +322,25 @@ server {
location ~* /migration {
proxy_pass http://127.0.0.1:5034;
}
location ~* /(clients|scopes) {
proxy_pass http://127.0.0.1:9090;
}
location ~* /oauth2 {
rewrite api/2.0/(.*) /$1 break;
proxy_redirect off;
proxy_pass http://127.0.0.1:8080;
}
}
location /oauth2/.well-known/openid-configuration {
rewrite oauth2/(.*) /$1 break;
proxy_pass http://127.0.0.1:8080;
}
location /oauth2 {
proxy_pass http://127.0.0.1:8080;
}
location /sso {

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# (c) Copyright Ascensio System SIA 2021
# (c) Copyright Ascensio System SIA 2024
#
# This program is a free software product. You can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License (AGPL)
@ -40,35 +40,15 @@ FILE_NAME="$(basename "$0")"
while [ "$1" != "" ]; do
case $1 in
-ls | --localscripts )
if [ "$2" == "true" ] || [ "$2" == "false" ]; then
PARAMETERS="$PARAMETERS ${1}";
LOCAL_SCRIPTS=$2
shift
fi
;;
-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
fi
;;
docker )
DOCKER="true";
shift && continue
;;
package )
DOCKER="false";
shift && continue
;;
-ls | --localscripts ) [ "$2" == "true" -o "$2" == "false" ] && { PARAMETERS+=" $1"; LOCAL_SCRIPTS=$2; shift; } ;;
-gb | --gitbranch ) [ -n "$2" ] && { PARAMETERS+=" $1"; GIT_BRANCH=$2; shift; } ;;
docker ) DOCKER="true"; shift && continue ;;
package ) DOCKER="false"; shift && continue ;;
"-?" | -h | --help )
if [ -z "$DOCKER" ]; then
echo "Run 'bash $FILE_NAME docker' to install docker version of application or 'bash $FILE_NAME package' to install deb/rpm version."
echo "Run 'bash $FILE_NAME docker' to install Docker version of application."
echo "Run 'bash $FILE_NAME package' to install DEB/RPM version."
echo "Run 'bash $FILE_NAME docker -h' or 'bash $FILE_NAME package -h' to get more details."
exit 0;
fi
@ -80,10 +60,7 @@ while [ "$1" != "" ]; do
done
root_checking () {
if [ ! $( id -u ) -eq 0 ]; then
echo "To perform this action you must be logged in with root rights"
exit 1;
fi
[ "$(id -u)" -eq 0 ] || { echo "To perform this action you must be logged in with root rights"; exit 1; }
}
command_exists () {
@ -98,91 +75,53 @@ install_curl () {
yum -y install curl
fi
if ! command_exists curl; then
echo "command curl not found"
exit 1;
fi
command_exists curl || { echo "Command curl not found."; exit 1; }
}
read_installation_method() {
echo "Select 'Y' to install ${product_sysname^^} $product using Docker (recommended). Select 'N' to install it using RPM/DEB packages.";
echo "Select 'Y' to install ${product_sysname^^} $product using Docker (recommended)."
echo "Select 'N' to install it using RPM/DEB packages."
while true; do
read -p "Install with Docker [Y/N/C]? " choice
case "$choice" in
y|Y )
DOCKER="true";
;;
n|N )
DOCKER="false";
;;
c|C )
exit 0;
;;
* )
echo "Please, enter Y, N or C to cancel";
;;
case "${choice,,}" in
y | yes) DOCKER="true"; break ;;
n | no) DOCKER="false"; break ;;
c | cancel) exit 0 ;;
*) echo "Please, enter Y, N, or C to cancel." ;;
esac
if [ "$DOCKER" == "" ]; then
read_installation_method;
fi
done
}
root_checking
if ! command_exists curl ; then
install_curl;
fi
command_exists curl || install_curl
if command_exists docker &> /dev/null && docker ps -a --format '{{.Names}}' | grep -q "${product_sysname}-api"; then
if command_exists docker && docker ps -a --format '{{.Names}}' | grep -q "${product_sysname}-api"; then
DOCKER="true"
elif command_exists apt-get &> /dev/null && dpkg -s ${product}-api >/dev/null 2>&1; then
elif command_exists dpkg && dpkg -s ${product}-api >/dev/null 2>&1; then
DOCKER="false"
elif command_exists yum &> /dev/null && rpm -q ${product}-api >/dev/null 2>&1; then
elif command_exists rpm && rpm -q ${product}-api >/dev/null 2>&1; then
DOCKER="false"
fi
if [ -z "$DOCKER" ]; then
read_installation_method;
fi
[ -z "$DOCKER" ] && read_installation_method
if [ -z $GIT_BRANCH ]; then
DOWNLOAD_URL_PREFIX="https://download.${product_sysname}.com/${product}"
else
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/${product_sysname^^}/${product}-buildtools/${GIT_BRANCH}/install/OneClickInstall"
fi
[ -n "$GIT_BRANCH" ] && DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/${product_sysname^^}/${product}-buildtools/${GIT_BRANCH}/install/OneClickInstall"
if [ "$DOCKER" == "true" ]; then
if [ "$LOCAL_SCRIPTS" == "true" ]; then
bash install-Docker.sh ${PARAMETERS} || EXIT_CODE=$?
else
curl -s -O ${DOWNLOAD_URL_PREFIX}/install-Docker.sh
bash install-Docker.sh ${PARAMETERS} || EXIT_CODE=$?
rm install-Docker.sh
fi
else
if [ -f /etc/redhat-release ] ; then
if [ "$LOCAL_SCRIPTS" == "true" ]; then
bash install-RedHat.sh ${PARAMETERS} || EXIT_CODE=$?
else
curl -s -O ${DOWNLOAD_URL_PREFIX}/install-RedHat.sh
bash install-RedHat.sh ${PARAMETERS} || EXIT_CODE=$?
rm install-RedHat.sh
fi
SCRIPT_NAME="install-Docker.sh"
elif [ -f /etc/redhat-release ]; then
SCRIPT_NAME="install-RedHat.sh"
elif [ -f /etc/debian_version ]; then
if [ "$LOCAL_SCRIPTS" == "true" ]; then
bash install-Debian.sh ${PARAMETERS} || EXIT_CODE=$?
SCRIPT_NAME="install-Debian.sh"
else
curl -s -O ${DOWNLOAD_URL_PREFIX}/install-Debian.sh
bash install-Debian.sh ${PARAMETERS} || EXIT_CODE=$?
rm install-Debian.sh
fi
else
echo "Not supported OS";
exit 1;
fi
echo "Not supported OS"
exit 1
fi
[ "$LOCAL_SCRIPTS" != "true" ] && curl -s -O ${DOWNLOAD_URL_PREFIX}/${SCRIPT_NAME}
bash ${SCRIPT_NAME} ${PARAMETERS} || EXIT_CODE=$?
[ "$LOCAL_SCRIPTS" != "true" ] && rm ${SCRIPT_NAME}
exit ${EXIT_CODE:-0}

View File

@ -17,92 +17,18 @@ INSTALL_FLUENT_BIT="true"
while [ "$1" != "" ]; do
case $1 in
-u | --update )
if [ "$2" != "" ]; then
UPDATE=$2
shift
fi
;;
-je | --jwtenabled )
if [ "$2" != "" ]; then
DS_JWT_ENABLED=$2
shift
fi
;;
-jh | --jwtheader )
if [ "$2" != "" ]; then
DS_JWT_HEADER=$2
shift
fi
;;
-js | --jwtsecret )
if [ "$2" != "" ]; then
DS_JWT_SECRET=$2
shift
fi
;;
-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
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
shift
fi
;;
-skiphc | --skiphardwarecheck )
if [ "$2" != "" ]; then
SKIP_HARDWARE_CHECK=$2
shift
fi
;;
-it | --installation_type )
if [ "$2" != "" ]; then
INSTALLATION_TYPE=$(echo "$2" | awk '{print toupper($0)}');
shift
fi
;;
-ms | --makeswap )
if [ "$2" != "" ]; then
MAKESWAP=$2
shift
fi
;;
-je | --jwtenabled ) [ -n "$2" ] && DS_JWT_ENABLED=$2 && shift ;;
-jh | --jwtheader ) [ -n "$2" ] && DS_JWT_HEADER=$2 && shift ;;
-js | --jwtsecret ) [ -n "$2" ] && DS_JWT_SECRET=$2 && shift ;;
-gb | --gitbranch ) [ -n "$2" ] && GIT_BRANCH=$2 && shift ;;
-du | --dashboadrsusername ) [ -n "$2" ] && DASHBOARDS_USERNAME=$2 && shift ;;
-dp | --dashboadrspassword ) [ -n "$2" ] && DASHBOARDS_PASSWORD=$2 && shift ;;
-it | --installation_type ) [ -n "$2" ] && INSTALLATION_TYPE=${2^^} && shift ;;
-u | --update ) [ "$2" == "true" -o "$2" == "false" ] && UPDATE=$2 && shift ;;
-ifb | --installfluentbit ) [ "$2" == "true" -o "$2" == "false" ] && INSTALL_FLUENT_BIT=$2 && shift ;;
-ls | --localscripts ) [ "$2" == "true" -o "$2" == "false" ] && LOCAL_SCRIPTS=$2 && shift ;;
-skiphc | --skiphardwarecheck ) [ "$2" == "true" -o "$2" == "false" ] && SKIP_HARDWARE_CHECK=$2 && shift ;;
-ms | --makeswap ) [ "$2" == "true" -o "$2" == "false" ] && MAKESWAP=$2 && shift ;;
-? | -h | --help )
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
echo " Parameters:"
@ -121,39 +47,21 @@ while [ "$1" != "" ]; do
echo
exit 0
;;
esac
shift
done
if [ -z "${UPDATE}" ]; then
UPDATE="false";
fi
if [ -z "${LOCAL_SCRIPTS}" ]; then
LOCAL_SCRIPTS="false";
fi
if [ -z "${SKIP_HARDWARE_CHECK}" ]; then
SKIP_HARDWARE_CHECK="false";
fi
UPDATE="${UPDATE:-false}"
LOCAL_SCRIPTS="${LOCAL_SCRIPTS:-false}"
SKIP_HARDWARE_CHECK="${SKIP_HARDWARE_CHECK:-false}"
apt-get update -y --allow-releaseinfo-change;
if [ $(dpkg-query -W -f='${Status}' curl 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
apt-get install -yq curl;
fi
dpkg -l | grep -q "^ii curl" || apt-get install -yq curl
if [ -z $GIT_BRANCH ]; then
DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/${product}/install-Debian"
else
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}-buildtools/${GIT_BRANCH}/install/OneClickInstall/install-Debian"
fi
DOWNLOAD_URL_PREFIX="https://download.${product_sysname}.com/${product}/install-Debian"
[ -n "$GIT_BRANCH" ] && DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/${product_sysname^^}/${product}-buildtools/${GIT_BRANCH}/install/OneClickInstall/install-Debian"
if [ "${LOCAL_SCRIPTS}" == "true" ]; then
source install-Debian/bootstrap.sh
else
source <(curl ${DOWNLOAD_URL_PREFIX}/bootstrap.sh)
fi
[[ "${LOCAL_SCRIPTS}" == "true" ]] && source install-Debian/bootstrap.sh || source <(curl ${DOWNLOAD_URL_PREFIX}/bootstrap.sh)
# add onlyoffice repo
mkdir -p -m 700 $HOME/.gnupg

View File

@ -10,6 +10,8 @@ cat<<EOF
EOF
hold_package_version
if [ "$DIST" = "debian" ] && [ $(apt-cache search ttf-mscorefonts-installer | wc -l) -eq 0 ]; then
echo "deb http://ftp.uk.debian.org/debian/ $DISTRIB_CODENAME main contrib" >> /etc/apt/sources.list
echo "deb-src http://ftp.uk.debian.org/debian/ $DISTRIB_CODENAME main contrib" >> /etc/apt/sources.list
@ -144,5 +146,3 @@ if which apparmor_parser && [ ! -f /etc/apparmor.d/disable/usr.sbin.mysqld ] &&
ln -sf /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/;
apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld;
fi
hold_package_version "dotnet-*" "aspnetcore-*" opensearch redis-server rabbitmq-server opensearch-dashboards fluent-bit

View File

@ -26,13 +26,23 @@ command_exists () {
# Function to prevent package auto-update
hold_package_version() {
for package in "$@"; do
if command -v apt-mark >/dev/null 2>&1 &&
dpkg-query -l "$package" >/dev/null 2>&1
then
apt-mark hold "$package"
packages=("dotnet-*" "aspnetcore-*" opensearch redis-server rabbitmq-server opensearch-dashboards fluent-bit)
for package in "${packages[@]}"; do
command -v apt-mark >/dev/null 2>&1 && apt-mark showhold | grep -q "^$package" && apt-mark unhold "$package"
done
UNATTENDED_UPGRADES_FILE="/etc/apt/apt.conf.d/50unattended-upgrades"
if [ -f ${UNATTENDED_UPGRADES_FILE} ] && grep -q "Package-Blacklist" ${UNATTENDED_UPGRADES_FILE}; then
for package in "${packages[@]}"; do
if ! grep -q "$package" ${UNATTENDED_UPGRADES_FILE}; then
sed -i "/Package-Blacklist/a \\\t\"$package\";" ${UNATTENDED_UPGRADES_FILE}
fi
done
if systemctl list-units --type=service --state=running | grep -q "unattended-upgrades"; then
systemctl restart unattended-upgrades
fi
fi
}
check_hardware () {

View File

@ -1,7 +1,7 @@
#!/bin/bash
#
# (c) Copyright Ascensio System SIA 2021
# (c) Copyright Ascensio System SIA 2024
#
# This program is a free software product. You can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License (AGPL)
@ -39,7 +39,6 @@ PROXY_YML="${BASE_DIR}/proxy.yml"
STATUS=""
DOCKER_TAG=""
INSTALLATION_TYPE="ENTERPRISE"
IMAGE_NAME="${PACKAGE_SYSNAME}/${PRODUCT}-api"
CONTAINER_NAME="${PACKAGE_SYSNAME}-api"
NETWORK_NAME=${PACKAGE_SYSNAME}
@ -112,386 +111,60 @@ EXTERNAL_PORT="80"
while [ "$1" != "" ]; do
case $1 in
-u | --update )
if [ "$2" != "" ]; then
UPDATE=$2
shift
fi
;;
-hub | --hub )
if [ "$2" != "" ]; then
HUB=$2
shift
fi
;;
-un | --username )
if [ "$2" != "" ]; then
USERNAME=$2
shift
fi
;;
-p | --password )
if [ "$2" != "" ]; then
PASSWORD=$2
shift
fi
;;
-ids | --installdocspace )
if [ "$2" != "" ]; then
INSTALL_PRODUCT=$2
shift
fi
;;
-idocs | --installdocs )
if [ "$2" != "" ]; then
INSTALL_DOCUMENT_SERVER=$2
shift
fi
;;
-imysql | --installmysql )
if [ "$2" != "" ]; then
INSTALL_MYSQL_SERVER=$2
shift
fi
;;
-irbt | --installrabbitmq )
if [ "$2" != "" ]; then
INSTALL_RABBITMQ=$2
shift
fi
;;
-irds | --installredis )
if [ "$2" != "" ]; then
INSTALL_REDIS=$2
shift
fi
;;
-ht | --helptarget )
if [ "$2" != "" ]; then
HELP_TARGET=$2
shift
fi
;;
-mysqld | --mysqldatabase )
if [ "$2" != "" ]; then
MYSQL_DATABASE=$2
shift
fi
;;
-mysqlrp | --mysqlrootpassword )
if [ "$2" != "" ]; then
MYSQL_ROOT_PASSWORD=$2
shift
fi
;;
-mysqlu | --mysqluser )
if [ "$2" != "" ]; then
MYSQL_USER=$2
shift
fi
;;
-mysqlh | --mysqlhost )
if [ "$2" != "" ]; then
MYSQL_HOST=$2
shift
fi
;;
-mysqlport | --mysqlport )
if [ "$2" != "" ]; then
MYSQL_PORT=$2
shift
fi
;;
-mysqlp | --mysqlpassword )
if [ "$2" != "" ]; then
MYSQL_PASSWORD=$2
shift
fi
;;
-espr | --elasticprotocol )
if [ "$2" != "" ]; then
ELK_SHEME=$2
shift
fi
;;
-esh | --elastichost )
if [ "$2" != "" ]; then
ELK_HOST=$2
shift
fi
;;
-esp | --elasticport )
if [ "$2" != "" ]; then
ELK_PORT=$2
shift
fi
;;
-skiphc | --skiphardwarecheck )
if [ "$2" != "" ]; then
SKIP_HARDWARE_CHECK=$2
shift
fi
;;
-ep | --externalport )
if [ "$2" != "" ]; then
EXTERNAL_PORT=$2
shift
fi
;;
-dsh | --docspacehost )
if [ "$2" != "" ]; then
APP_URL_PORTAL=$2
shift
fi
;;
-mk | --machinekey )
if [ "$2" != "" ]; then
APP_CORE_MACHINEKEY=$2
shift
fi
;;
-env | --environment )
if [ "$2" != "" ]; then
ENV_EXTENSION=$2
shift
fi
;;
-s | --status )
if [ "$2" != "" ]; then
STATUS=$2
IMAGE_NAME="${PACKAGE_SYSNAME}/${STATUS}${PRODUCT}-api"
shift
fi
;;
-ls | --localscripts )
if [ "$2" != "" ]; then
shift
fi
;;
-dsv | --docspaceversion )
if [ "$2" != "" ]; then
DOCKER_TAG=$2
shift
fi
;;
-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
fi
;;
-docsi | --docsimage )
if [ "$2" != "" ]; then
DOCUMENT_SERVER_IMAGE_NAME=$2
shift
fi
;;
-docsv | --docsversion )
if [ "$2" != "" ]; then
DOCUMENT_SERVER_VERSION=$2
shift
fi
;;
-docsurl | --docsurl )
if [ "$2" != "" ]; then
DOCUMENT_SERVER_URL_EXTERNAL=$2
shift
fi
;;
-dbm | --databasemigration )
if [ "$2" != "" ]; then
DATABASE_MIGRATION=$2
shift
fi
;;
-jh | --jwtheader )
if [ "$2" != "" ]; then
DOCUMENT_SERVER_JWT_HEADER=$2
shift
fi
;;
-js | --jwtsecret )
if [ "$2" != "" ]; then
DOCUMENT_SERVER_JWT_SECRET=$2
shift
fi
;;
-it | --installation_type )
if [ "$2" != "" ]; then
INSTALLATION_TYPE=$(echo "$2" | awk '{print toupper($0)}');
shift
fi
;;
-ms | --makeswap )
if [ "$2" != "" ]; then
MAKESWAP=$2
shift
fi
;;
-ies | --installelastic )
if [ "$2" != "" ]; then
INSTALL_ELASTICSEARCH=$2
shift
fi
;;
-ifb | --installfluentbit )
if [ "$2" != "" ]; then
INSTALL_FLUENT_BIT=$2
shift
fi
;;
-rdsh | --redishost )
if [ "$2" != "" ]; then
REDIS_HOST=$2
shift
fi
;;
-rdsp | --redisport )
if [ "$2" != "" ]; then
REDIS_PORT=$2
shift
fi
;;
-rdsu | --redisusername )
if [ "$2" != "" ]; then
REDIS_USER_NAME=$2
shift
fi
;;
-rdspass | --redispassword )
if [ "$2" != "" ]; then
REDIS_PASSWORD=$2
shift
fi
;;
-rbth | --rabbitmqhost )
if [ "$2" != "" ]; then
RABBIT_HOST=$2
shift
fi
;;
-rbtp | --rabbitmqport )
if [ "$2" != "" ]; then
RABBIT_PORT=$2
shift
fi
;;
-rbtu | --rabbitmqusername )
if [ "$2" != "" ]; then
RABBIT_USER_NAME=$2
shift
fi
;;
-rbtpass | --rabbitmqpassword )
if [ "$2" != "" ]; then
RABBIT_PASSWORD=$2
shift
fi
;;
-rbtvh | --rabbitmqvirtualhost )
if [ "$2" != "" ]; then
RABBIT_VIRTUAL_HOST=$2
shift
fi
;;
-led | --letsencryptdomain )
if [ "$2" != "" ]; then
LETS_ENCRYPT_DOMAIN=$2
shift
fi
;;
-lem | --letsencryptmail )
if [ "$2" != "" ]; then
LETS_ENCRYPT_MAIL=$2
shift
fi
;;
-cf | --certfile )
if [ "$2" != "" ]; then
CERTIFICATE_PATH=$2
shift
fi
;;
-ckf | --certkeyfile )
if [ "$2" != "" ]; then
CERTIFICATE_KEY_PATH=$2
shift
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
shift
fi
;;
-hub | --hub ) [ -n "$2" ] && HUB=$2 && shift ;;
-un | --username ) [ -n "$2" ] && USERNAME=$2 && shift ;;
-p | --password ) [ -n "$2" ] && PASSWORD=$2 && shift ;;
-ht | --helptarget ) [ -n "$2" ] && HELP_TARGET=$2 && shift ;;
-mysqld | --mysqldatabase ) [ -n "$2" ] && MYSQL_DATABASE=$2 && shift ;;
-mysqlrp | --mysqlrootpassword ) [ -n "$2" ] && MYSQL_ROOT_PASSWORD=$2 && shift ;;
-mysqlu | --mysqluser ) [ -n "$2" ] && MYSQL_USER=$2 && shift ;;
-mysqlh | --mysqlhost ) [ -n "$2" ] && MYSQL_HOST=$2 && shift ;;
-mysqlport | --mysqlport ) [ -n "$2" ] && MYSQL_PORT=$2 && shift ;;
-mysqlp | --mysqlpassword ) [ -n "$2" ] && MYSQL_PASSWORD=$2 && shift ;;
-espr | --elasticprotocol ) [ -n "$2" ] && ELK_SHEME=$2 && shift ;;
-esh | --elastichost ) [ -n "$2" ] && ELK_HOST=$2 && shift ;;
-esp | --elasticport ) [ -n "$2" ] && ELK_PORT=$2 && shift ;;
-ep | --externalport ) [ -n "$2" ] && EXTERNAL_PORT=$2 && shift ;;
-dsh | --docspacehost ) [ -n "$2" ] && APP_URL_PORTAL=$2 && shift ;;
-mk | --machinekey ) [ -n "$2" ] && APP_CORE_MACHINEKEY=$2 && shift ;;
-env | --environment ) [ -n "$2" ] && ENV_EXTENSION=$2 && shift ;;
-dsv | --docspaceversion ) [ -n "$2" ] && DOCKER_TAG=$2 && shift ;;
-gb | --gitbranch ) [ -n "$2" ] && GIT_BRANCH=$2 && shift ;;
-docsi | --docsimage ) [ -n "$2" ] && DOCUMENT_SERVER_IMAGE_NAME=$2 && shift ;;
-docsv | --docsversion ) [ -n "$2" ] && DOCUMENT_SERVER_VERSION=$2 && shift ;;
-docsurl | --docsurl ) [ -n "$2" ] && DOCUMENT_SERVER_URL_EXTERNAL=$2 && shift ;;
-dbm | --databasemigration ) [ -n "$2" ] && DATABASE_MIGRATION=$2 && shift ;;
-jh | --jwtheader ) [ -n "$2" ] && DOCUMENT_SERVER_JWT_HEADER=$2 && shift ;;
-js | --jwtsecret ) [ -n "$2" ] && DOCUMENT_SERVER_JWT_SECRET=$2 && shift ;;
-rdsh | --redishost ) [ -n "$2" ] && REDIS_HOST=$2 && shift ;;
-rdsp | --redisport ) [ -n "$2" ] && REDIS_PORT=$2 && shift ;;
-rdsu | --redisusername ) [ -n "$2" ] && REDIS_USER_NAME=$2 && shift ;;
-rdspass | --redispassword ) [ -n "$2" ] && REDIS_PASSWORD=$2 && shift ;;
-rbth | --rabbitmqhost ) [ -n "$2" ] && RABBIT_HOST=$2 && shift ;;
-rbtp | --rabbitmqport ) [ -n "$2" ] && RABBIT_PORT=$2 && shift ;;
-rbtu | --rabbitmqusername ) [ -n "$2" ] && RABBIT_USER_NAME=$2 && shift ;;
-rbtpass | --rabbitmqpassword ) [ -n "$2" ] && RABBIT_PASSWORD=$2 && shift ;;
-rbtvh | --rabbitmqvirtualhost) [ -n "$2" ] && RABBIT_VIRTUAL_HOST=$2 && shift ;;
-led | --letsencryptdomain ) [ -n "$2" ] && LETS_ENCRYPT_DOMAIN=$2 && shift ;;
-lem | --letsencryptmail ) [ -n "$2" ] && LETS_ENCRYPT_MAIL=$2 && shift ;;
-cf | --certfile ) [ -n "$2" ] && CERTIFICATE_PATH=$2 && shift ;;
-ckf | --certkeyfile ) [ -n "$2" ] && CERTIFICATE_KEY_PATH=$2 && shift ;;
-du | --dashboadrsusername ) [ -n "$2" ] && DASHBOARDS_USERNAME=$2 && shift ;;
-dp | --dashboadrspassword ) [ -n "$2" ] && DASHBOARDS_PASSWORD=$2 && shift ;;
-s | --status ) [ -n "$2" ] && STATUS=$2 && shift ;;
-it | --installation_type ) [ -n "$2" ] && INSTALLATION_TYPE=${2^^} && shift ;;
-ids | --installdocspace ) [[ "$2" =~ ^(true|false|pull)$ ]] && INSTALL_PRODUCT=$2 && shift ;;
-idocs | --installdocs ) [[ "$2" =~ ^(true|false|pull)$ ]] && INSTALL_DOCUMENT_SERVER=$2 && shift ;;
-imysql | --installmysql ) [[ "$2" =~ ^(true|false|pull)$ ]] && INSTALL_MYSQL_SERVER=$2 && shift ;;
-irbt | --installrabbitmq ) [[ "$2" =~ ^(true|false|pull)$ ]] && INSTALL_RABBITMQ=$2 && shift ;;
-irds | --installredis ) [[ "$2" =~ ^(true|false|pull)$ ]] && INSTALL_REDIS=$2 && shift ;;
-ies | --installelastic ) [[ "$2" =~ ^(true|false|pull)$ ]] && INSTALL_ELASTICSEARCH=$2 && shift ;;
-ifb | --installfluentbit ) [[ "$2" =~ ^(true|false|pull)$ ]] && INSTALL_FLUENT_BIT=$2 && shift ;;
-u | --update ) [ "$2" == "true" -o "$2" == "false" ] && UPDATE=$2 && shift ;;
-skiphc | --skiphardwarecheck ) [ "$2" == "true" -o "$2" == "false" ] && SKIP_HARDWARE_CHECK=$2 && shift ;;
-noni | --noninteractive ) [ "$2" == "true" -o "$2" == "false" ] && NON_INTERACTIVE=$2 && shift ;;
-ls | --localscripts ) [ "$2" == "true" -o "$2" == "false" ] && LOCAL_SCRIPTS=$2 && shift ;;
-ms | --makeswap ) [ "$2" == "true" -o "$2" == "false" ] && MAKESWAP=$2 && shift ;;
-? | -h | --help )
echo " Usage: bash $HELP_TARGET [PARAMETER] [[PARAMETER], ...]"
echo
@ -502,23 +175,23 @@ while [ "$1" != "" ]; do
echo " -it, --installation_type installation type (community|enterprise)"
echo " -skiphc, --skiphardwarecheck skip hardware check (true|false)"
echo " -u, --update use to update existing components (true|false)"
echo " -ids, --installdocspace install or update $PRODUCT (true|false)"
echo " -ids, --installdocspace install or update $PRODUCT (true|false|pull)"
echo " -dsv, --docspaceversion select the $PRODUCT version"
echo " -dsh, --docspacehost $PRODUCT host"
echo " -env, --environment $PRODUCT environment"
echo " -mk, --machinekey setting for core.machinekey"
echo " -ep, --externalport external $PRODUCT port (default value 80)"
echo " -idocs, --installdocs install or update document server (true|false)"
echo " -idocs, --installdocs install or update document server (true|false|pull)"
echo " -docsi, --docsimage document server image name"
echo " -docsv, --docsversion document server version"
echo " -docsurl, --docsurl $PACKAGE_SYSNAME docs server address (example http://$PACKAGE_SYSNAME-docs-address:8083)"
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 " -irbt, --installrabbitmq install or update rabbitmq (true|false)"
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 " -irbt, --installrabbitmq install or update rabbitmq (true|false|pull)"
echo " -irds, --installredis install or update redis (true|false|pull)"
echo " -imysql, --installmysql install or update mysql (true|false)|pull"
echo " -ies, --installelastic install or update elasticsearch (true|false|pull)"
echo " -ifb, --installfluentbit install or update fluent-bit (true|false|pull)"
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)"
@ -548,21 +221,21 @@ while [ "$1" != "" ]; do
echo " -ms, --makeswap make swap file (true|false)"
echo " -?, -h, --help this help"
echo
echo " Install all the components without document server:"
echo " Install all the components without Document Server:"
echo " bash $HELP_TARGET -idocs false"
echo
echo " Install Document Server only. Skip the installation of mysql, $PRODUCT, rabbitmq, redis:"
echo " bash $HELP_TARGET -ids false -idocs true -imysql false -irbt false -irds false"
echo " Install Document Server only. Skip the installation of $PRODUCT, mysql, rabbitmq, redis, elasticsearch, fluent-bit:"
echo " bash $HELP_TARGET -idocs true -ids false -imysql false -irbt false -irds false -ies false -ifb false"
echo
echo " Update all installed components. Stop the containers that need to be updated, remove them and run the latest versions of the corresponding components."
echo " The portal data should be picked up automatically:"
echo " bash $HELP_TARGET -u true"
echo
echo " Update Document Server only to version 7.2.1.34 and skip the update for all other components:"
echo " bash $HELP_TARGET -u true -docsi ${PACKAGE_SYSNAME}/documentserver-ee -docsv 7.2.1.34 -idocs true -ids false -irbt false -irds false"
echo " Update Document Server only to version 8.1.0 and skip the update for all other components:"
echo " bash $HELP_TARGET -u true -docsi ${PACKAGE_SYSNAME}/documentserver-ee -docsv 8.1.0 -idocs true -ids false -imysql false -irbt false -irds false -ies false -ifb false"
echo
echo " Update $PRODUCT only to version 1.2.0 and skip the update for all other components:"
echo " bash $HELP_TARGET -u true -dsv v1.2.0 -idocs false -irbt false -irds false"
echo " Update $PRODUCT only to version 2.5.1 and skip the update for all other components:"
echo " bash $HELP_TARGET -u true -dsv 2.5.1 -idocs false -imysql false -irbt false -irds false -ies false -ifb false"
echo
exit 0
;;
@ -577,29 +250,13 @@ done
root_checking () {
PID=$$
if [ ! $( id -u ) -eq 0 ]; then
echo "To perform this action you must be logged in with root rights"
exit 1;
fi
[ $(id -u) -ne 0 ] && echo "To perform this action you must be logged in with root rights" && exit 1
}
command_exists () {
type "$1" &> /dev/null;
}
file_exists () {
if [ -z "$1" ]; then
echo "file path is empty"
exit 1;
fi
if [ -f "$1" ]; then
return 0; #true
else
return 1; #false
fi
}
to_lowercase () {
echo "$1" | awk '{print tolower($0)}'
}
@ -609,13 +266,8 @@ trim () {
}
get_random_str () {
LENGTH=$1;
if [[ -z ${LENGTH} ]]; then
LENGTH=12;
fi
VALUE=$(cat /dev/urandom | tr -dc A-Za-z0-9 | head -c ${LENGTH});
LENGTH=${1:-12}
VALUE=$(tr -dc A-Za-z0-9 < /dev/urandom | head -c "$LENGTH")
echo "$VALUE"
}
@ -926,25 +578,16 @@ create_network () {
}
read_continue_installation () {
if [[ "${NON_INTERACTIVE}" = "true" ]]; then
return 0
fi
[ "$NON_INTERACTIVE" = "true" ] && return 0
while true; do
read -p "Continue installation [Y/N]? " CHOICE_INSTALLATION
case "$CHOICE_INSTALLATION" in
y|Y )
return 0
;;
n|N )
exit 0;
;;
* )
echo "Please, enter Y or N";
read_continue_installation
;;
case "${CHOICE_INSTALLATION,,}" in
y | yes) return 0 ;;
n | no) exit 0 ;;
*) echo "Please, enter Y or N" ;;
esac
done
}
domain_check () {
@ -1180,6 +823,8 @@ set_docspace_params() {
}
set_installation_type_data () {
IMAGE_NAME="${PACKAGE_SYSNAME}/${STATUS}${PRODUCT}-api"
if [ "$INSTALLATION_TYPE" == "COMMUNITY" ]; then
DOCUMENT_SERVER_IMAGE_NAME=${DOCUMENT_SERVER_IMAGE_NAME:-"${PACKAGE_SYSNAME}/${STATUS}documentserver"}
elif [ "$INSTALLATION_TYPE" == "ENTERPRISE" ]; then

View File

@ -26,92 +26,18 @@ res_unsupported_version () {
while [ "$1" != "" ]; do
case $1 in
-u | --update )
if [ "$2" != "" ]; then
UPDATE=$2
shift
fi
;;
-je | --jwtenabled )
if [ "$2" != "" ]; then
JWT_ENABLED=$2
shift
fi
;;
-jh | --jwtheader )
if [ "$2" != "" ]; then
JWT_HEADER=$2
shift
fi
;;
-js | --jwtsecret )
if [ "$2" != "" ]; then
JWT_SECRET=$2
shift
fi
;;
-gb | --gitbranch )
if [ "$2" != "" ]; then
PARAMETERS="$PARAMETERS ${1}";
GIT_BRANCH=$2
shift
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
shift
fi
;;
-skiphc | --skiphardwarecheck )
if [ "$2" != "" ]; then
SKIP_HARDWARE_CHECK=$2
shift
fi
;;
-it | --installation_type )
if [ "$2" != "" ]; then
INSTALLATION_TYPE=$(echo "$2" | awk '{print toupper($0)}');
shift
fi
;;
-ms | --makeswap )
if [ "$2" != "" ]; then
MAKESWAP=$2
shift
fi
;;
-je | --jwtenabled ) [ -n "$2" ] && JWT_ENABLED=$2 && shift ;;
-jh | --jwtheader ) [ -n "$2" ] && JWT_HEADER=$2 && shift ;;
-js | --jwtsecret ) [ -n "$2" ] && JWT_SECRET=$2 && shift ;;
-gb | --gitbranch ) [ -n "$2" ] && GIT_BRANCH=$2 && shift ;;
-du | --dashboadrsusername ) [ -n "$2" ] && DASHBOARDS_USERNAME=$2 && shift ;;
-dp | --dashboadrspassword ) [ -n "$2" ] && DASHBOARDS_PASSWORD=$2 && shift ;;
-it | --installation_type ) [ -n "$2" ] && INSTALLATION_TYPE=${2^^} && shift ;;
-u | --update ) [ "$2" == "true" -o "$2" == "false" ] && UPDATE=$2 && shift ;;
-ifb | --installfluentbit ) [ "$2" == "true" -o "$2" == "false" ] && INSTALL_FLUENT_BIT=$2 && shift ;;
-ls | --localscripts ) [ "$2" == "true" -o "$2" == "false" ] && LOCAL_SCRIPTS=$2 && shift ;;
-skiphc | --skiphardwarecheck ) [ "$2" == "true" -o "$2" == "false" ] && SKIP_HARDWARE_CHECK=$2 && shift ;;
-ms | --makeswap ) [ "$2" == "true" -o "$2" == "false" ] && MAKESWAP=$2 && shift ;;
-? | -h | --help )
echo " Usage $0 [PARAMETER] [[PARAMETER], ...]"
echo " Parameters:"
@ -130,22 +56,13 @@ while [ "$1" != "" ]; do
echo
exit 0
;;
esac
shift
done
if [ -z "${UPDATE}" ]; then
UPDATE="false";
fi
if [ -z "${LOCAL_SCRIPTS}" ]; then
LOCAL_SCRIPTS="false";
fi
if [ -z "${SKIP_HARDWARE_CHECK}" ]; then
SKIP_HARDWARE_CHECK="false";
fi
UPDATE="${UPDATE:-false}"
LOCAL_SCRIPTS="${LOCAL_SCRIPTS:-false}"
SKIP_HARDWARE_CHECK="${SKIP_HARDWARE_CHECK:-false}"
cat > /etc/yum.repos.d/onlyoffice.repo <<END
[onlyoffice]
@ -156,11 +73,8 @@ enabled=1
gpgkey=https://download.onlyoffice.com/GPG-KEY-ONLYOFFICE
END
if [ -z $GIT_BRANCH ]; then
DOWNLOAD_URL_PREFIX="https://download.onlyoffice.com/${product}/install-RedHat"
else
DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/ONLYOFFICE/${product}-buildtools/${GIT_BRANCH}/install/OneClickInstall/install-RedHat"
fi
DOWNLOAD_URL_PREFIX="https://download.${product_sysname}.com/${product}/install-RedHat"
[ -n "$GIT_BRANCH" ] && DOWNLOAD_URL_PREFIX="https://raw.githubusercontent.com/${product_sysname^^}/${product}-buildtools/${GIT_BRANCH}/install/OneClickInstall/install-RedHat"
if [ "$LOCAL_SCRIPTS" = "true" ]; then
source install-RedHat/tools.sh

View File

@ -39,7 +39,7 @@ yum localinstall -y --nogpgcheck https://download1.rpmfusion.org/free/$RPMFUSION
[ "$REV" = "9" ] && update-crypto-policies --set DEFAULT:SHA1
if [ "$DIST" == "centos" ]; then
[ "$REV" = "9" ] && TESTING_REPO="--enablerepo=crb" || POWERTOOLS_REPO="--enablerepo=powertools"
[ "$REV" = "9" ] && { ${package_manager} -y install xorg-x11-font-utils; TESTING_REPO="--enablerepo=crb"; } || POWERTOOLS_REPO="--enablerepo=powertools"
elif [ "$DIST" == "redhat" ]; then
/usr/bin/crb enable
fi

View File

@ -88,7 +88,7 @@ override_dh_auto_build: check_archives
sed -i '/^\[OUTPUT\]/i\[INPUT]' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\ Name exec' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\ Interval_Sec 86400' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\ 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": "now-30d"}}}}'\'' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\ 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": "now-30d"}}}}'\''' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\\' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
for i in ${PRODUCT} $$(ls ${CURDIR}/debian/*.install | grep -oP 'debian/\K.*' | grep -o '^[^.]*'); do \

View File

@ -125,3 +125,21 @@
NETWORK_NAME=${PRODUCT}
COMPOSE_IGNORE_ORPHANS=True
# identity #
IDENTITY_DOCKERFILE=/Dockerfile
JDBC_USER_NAME=root
JDBC_PASSWORD=${MYSQL_ROOT_PASSWORD}
JDBC_URL=${MYSQL_CONTAINER_NAME}
JDBC_DATABASE=${MYSQL_DATABASE}
IDENTITY_PROFILE="dev"
IDENTITY_MIGRATION_CONTAINER_NAME=${CONTAINER_PREFIX}identity_migration
IDENTITY_MIGRATION_SERVER_PORT=8081
IDENTITY_AUTHORIZATION_CONTAINER_NAME=${CONTAINER_PREFIX}identity-authorization
IDENTITY_AUTHORIZATION_SERVER_PORT=8080
IDENTITY_API_CONTAINER_NAME=${CONTAINER_PREFIX}identity-api
IDENTITY_API_SERVER_PORT=9090
REDIS_ADDRESSES=redis://onlyoffice-redis:6379

View File

@ -176,6 +176,8 @@ RUN chown nginx:nginx /etc/nginx/* -R && \
sed -i 's/127.0.0.1:9834/$service_sso/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5013/$service_doceditor/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5011/$service_login/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:9090/$service_identity_api/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:8080/$service_identity/' /etc/nginx/conf.d/onlyoffice.conf && \
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 && \

View File

@ -52,7 +52,7 @@ RUN cd ${SRC_PATH} && \
cd ${SRC_PATH} && \
cp buildtools/config/*.config /app/onlyoffice/config/ && \
mkdir -p /etc/nginx/conf.d && cp -f buildtools/config/nginx/onlyoffice*.conf /etc/nginx/conf.d/ && \
mkdir -p /etc/nginx/includes/ && cp -f buildtools/config/nginx/includes/onlyoffice*.conf /etc/nginx/includes/ && \
mkdir -p /etc/nginx/includes/ && cp -f buildtools/config/nginx/includes/onlyoffice*.conf /etc/nginx/includes/ && cp -f buildtools/config/nginx/includes/server-*.conf /etc/nginx/includes/ && \
sed -i "s/\"number\".*,/\"number\": \"${PRODUCT_VERSION}.${BUILD_NUMBER}\",/g" /app/onlyoffice/config/appsettings.json && \
sed -e 's/#//' -i /etc/nginx/conf.d/onlyoffice.conf && \
cd ${SRC_PATH}/buildtools/install/common/ && \
@ -170,10 +170,12 @@ RUN sed -i 's/127.0.0.1:5010/$service_api_system/' /etc/nginx/conf.d/onlyoffice.
sed -i 's/127.0.0.1:9834/$service_sso/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5013/$service_doceditor/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5011/$service_login/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:9090/$service_identity_api/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:8080/$service_identity/' /etc/nginx/conf.d/onlyoffice.conf && \
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/127.0.0.1:5601/$dashboards_host:5601/' /etc/nginx/includes/server-dashboards.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 && \

View File

@ -122,6 +122,8 @@ RUN chown onlyoffice:onlyoffice /etc/nginx/* -R && \
sed -i 's/127.0.0.1:9834/$service_sso/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5013/$service_doceditor/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5011/$service_login/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:9090/$service_identity_api/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:8080/$service_identity/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5001/$service_client/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5015/$service_management/' /etc/nginx/conf.d/onlyoffice.conf && \
sed -i 's/127.0.0.1:5033/$service_healthchecks/' /etc/nginx/conf.d/onlyoffice.conf && \

View File

@ -54,6 +54,18 @@ map $SERVICE_API $service_api {
default $SERVICE_API;
}
map $SERVICE_IDENTITY_API $service_identity_api {
volatile;
"" 127.0.0.1:9090;
default $SERVICE_IDENTITY_API;
}
map $SERVICE_IDENTITY $service_identity {
volatile;
"" 127.0.0.1:8080;
default $SERVICE_IDENTITY;
}
map $SERVICE_STUDIO $service_studio {
volatile;
"" 127.0.0.1:5003;

View File

@ -264,6 +264,8 @@ services:
- SERVICE_NOTIFY=${SERVICE_NOTIFY}
- SERVICE_PEOPLE_SERVER=${SERVICE_PEOPLE_SERVER}
- SERVICE_SOCKET=${SERVICE_SOCKET}
- SERVICE_IDENTITY_API=${SERVICE_IDENTITY_API}
- SERVICE_IDENTITY=${SERVICE_IDENTITY}
- SERVICE_STUDIO_NOTIFY=${SERVICE_STUDIO_NOTIFY}
- SERVICE_API=${SERVICE_API}
- SERVICE_API_SYSTEM=${SERVICE_API_SYSTEM}

View File

@ -1,5 +1,5 @@
x-healthcheck:
&x-healthcheck
version: "3.8"
x-healthcheck: &x-healthcheck
test: curl --fail http://127.0.0.1 || exit 1
interval: 60s
retries: 5
@ -208,6 +208,8 @@ services:
- SERVICE_NOTIFY=${SERVICE_NOTIFY}
- SERVICE_PEOPLE_SERVER=${SERVICE_PEOPLE_SERVER}
- SERVICE_SOCKET=${SERVICE_SOCKET}
- SERVICE_IDENTITY_API=${SERVICE_IDENTITY_API}
- SERVICE_IDENTITY=${SERVICE_IDENTITY}
- SERVICE_STUDIO_NOTIFY=${SERVICE_STUDIO_NOTIFY}
- SERVICE_API=${SERVICE_API}
- SERVICE_API_SYSTEM=${SERVICE_API_SYSTEM}

View File

@ -0,0 +1,69 @@
version: "3.8"
services:
onlyoffice-identity-authorization:
build:
context: ../../../server/common/ASC.Identity
dockerfile: ${IDENTITY_DOCKERFILE}
args:
- MODULE=authorization/authorization-container
container_name: ${IDENTITY_AUTHORIZATION_CONTAINER_NAME}
restart: always
ports:
- 8080:8080
environment:
- SPRING_PROFILES_ACTIVE=${IDENTITY_PROFILE}
- SPRING_APPLICATION_NAME=ASC.Identity.Authorization
- SERVER_PORT=${IDENTITY_AUTHORIZATION_SERVER_PORT}
- JDBC_PASSWORD=${JDBC_PASSWORD}
- JDBC_URL=${JDBC_URL}
- JDBC_USER_NAME=${JDBC_USER_NAME}
- JDBC_DATABASE=${JDBC_DATABASE}
- RABBIT_HOST=onlyoffice-rabbitmq
- REDIS_HOST=onlyoffice-redis
depends_on:
- onlyoffice-identity-migration
onlyoffice-identity-api:
build:
context: ../../../server/common/ASC.Identity
dockerfile: ${IDENTITY_DOCKERFILE}
args:
- MODULE=registration/registration-container
container_name: ${IDENTITY_API_CONTAINER_NAME}
ports:
- 9090:9090
environment:
- SPRING_PROFILES_ACTIVE=${PROFILE}
- SPRING_APPLICATION_NAME=ASC.Identity.Registration
- SERVER_PORT=${IDENTITY_API_SERVER_PORT}
- JDBC_PASSWORD=${JDBC_PASSWORD}
- JDBC_URL=${JDBC_URL}
- JDBC_USER_NAME=${JDBC_USER_NAME}
- JDBC_DATABASE=${JDBC_DATABASE}
- RABBIT_HOST=onlyoffice-rabbitmq
- REDIS_HOST=onlyoffice-redis
depends_on:
- onlyoffice-identity-migration
onlyoffice-identity-migration:
build:
context: ../../../server/common/ASC.Identity
dockerfile: ${IDENTITY_DOCKERFILE}
args:
- MODULE=infrastructure/infrastructure-migration-runner
container_name: ${IDENTITY_MIGRATION_CONTAINER_NAME}
restart: "no"
ports:
- 8081:8081
environment:
- JDBC_PASSWORD=${JDBC_PASSWORD}
- JDBC_URL=${JDBC_URL}
- JDBC_USER_NAME=${JDBC_USER_NAME}
- JDBC_DATABASE=${JDBC_DATABASE}
- RABBIT_HOST=onlyoffice-rabbitmq
- REDIS_HOST=onlyoffice-redis
networks:
default:
name: ${NETWORK_NAME}
external: true

View File

@ -34,7 +34,7 @@ sed -i "s#\(/var/log/onlyoffice/\)#\1%{product}#" install/docker/config/fluent-b
sed -i '/^\[OUTPUT\]/i\[INPUT]' install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\ Name exec' install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\ Interval_Sec 86400' install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\ 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": "now-30d"}}}}'\'' ${BUILDTOOLS_PATH}/install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\ 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": "now-30d"}}}}'\''' install/docker/config/fluent-bit.conf
sed -i '/^\[OUTPUT\]/i\\' install/docker/config/fluent-bit.conf
find %{_builddir}/server/publish/ \

View File

@ -25,6 +25,7 @@ mkdir -p "%{buildroot}%{buildpath}/products/ASC.Files/server/DocStore/"
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Files/editor/"
# Hidden folders are not copied when applying a mask * (only in RPM), so we explicitly copy .next directory in this way
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Files/editor/.next/"
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Login/login/.next/"
mkdir -p "%{buildroot}%{buildpath}/products/ASC.Files/client/"
mkdir -p "%{buildroot}%{buildpath}/client/"
mkdir -p "%{buildroot}%{buildpath}/management/"
@ -40,6 +41,7 @@ mkdir -p "%{buildroot}%{_bindir}/"
cp -rf %{_builddir}/publish/web/public/* "%{buildroot}%{buildpath}/public/"
cp -rf %{_builddir}/campaigns/src/campaigns/* "%{buildroot}%{buildpath}/public/campaigns"
cp -rf %{_builddir}/publish/web/login/* "%{buildroot}%{buildpath}/products/ASC.Login/login/"
cp -rf %{_builddir}/publish/web/login/.next/* "%{buildroot}%{buildpath}/products/ASC.Login/login/.next/"
cp -rf %{_builddir}/publish/web/editor/* "%{buildroot}%{buildpath}/products/ASC.Files/editor/"
cp -rf %{_builddir}/publish/web/editor/.next/* "%{buildroot}%{buildpath}/products/ASC.Files/editor/.next/"
cp -rf %{_builddir}/server/products/ASC.Files/Server/DocStore/* "%{buildroot}%{buildpath}/products/ASC.Files/server/DocStore/"

12
run/IdentityApi.xml Normal file
View File

@ -0,0 +1,12 @@
<service>
<id>OnlyofficeIdentityApi</id>
<name>ONLYOFFICE IdentityApi</name>
<startmode>manual</startmode>
<executable>java</executable>
<env name="LOG_FILE_PATH" value="../../Logs/identity-api.log"/>
<env name="SPRING_PROFILES_ACTIVE" value=""/>
<arguments>-jar ../../server/common/ASC.Identity/registration/registration-container/target/registration-container-1.0.0.jar</arguments>
<log mode="none"/>
<delayedAutoStart>true</delayedAutoStart>
<onfailure action="restart" delay="5 sec" />
</service>

12
run/IdentityMigration.xml Normal file
View File

@ -0,0 +1,12 @@
<service>
<id>OnlyofficeIdentityMigration</id>
<name>ONLYOFFICE IdentityMigration</name>
<startmode>manual</startmode>
<executable>java</executable>
<env name="LOG_FILE_PATH" value="../../Logs/identity-migration.log"/>
<env name="SPRING_PROFILES_ACTIVE" value="dev"/>
<arguments>-jar ../../server/common/ASC.Identity/infrastructure/infrastructure-migration-runner/target/infrastructure-migration-runner-1.0.0.jar</arguments>
<log mode="none"/>
<delayedAutoStart>true</delayedAutoStart>
<onfailure action="restart" delay="5 sec" />
</service>

13
run/IdentityService.xml Normal file
View File

@ -0,0 +1,13 @@
<service>
<id>OnlyofficeIdentityService</id>
<name>ONLYOFFICE IdentityService</name>
<startmode>manual</startmode>
<executable>java</executable>
<env name="LOG_FILE_PATH" value="../../Logs/identity-authorization.log"/>
<env name="SERVER_PORT" value="8080"/>
<env name="SPRING_PROFILES_ACTIVE" value=""/>
<arguments>-jar ../../server/common/ASC.Identity/authorization/authorization-container/target/authorization-container-1.0.0.jar</arguments>
<log mode="none"/>
<delayedAutoStart>true</delayedAutoStart>
<onfailure action="restart" delay="5 sec" />
</service>

View File

@ -3,7 +3,8 @@
<name>ONLYOFFICE Login SSR</name>
<startmode>manual</startmode>
<executable>node</executable>
<arguments>../../publish/web/login/server.js</arguments>
<arguments>server.js</arguments>
<workingdirectory>%BASE%\..\..\client\packages\login</workingdirectory>
<log mode="none"/>
<delayedAutoStart>true</delayedAutoStart>
<onfailure action="none" />

28
scripts/identity.bat Normal file
View File

@ -0,0 +1,28 @@
PUSHD %~dp0..
cd %~dp0../../server/common/ASC.Identity/
echo Start build ASC.Identity project...
echo.
echo ASC.Identity: resolves all project dependencies...
echo.
call mvn dependency:go-offline -q
if %errorlevel% == 0 (
echo ASC.Identity: take the compiled code and package it in its distributable format, such as a JAR...
call mvn package -DskipTests -q
)
if %errorlevel% == 0 (
echo ASC.Identity: build completed
echo.
)
POPD