Skip to content

Commit

Permalink
Merge pull request #427 from ONLYOFFICE/feature/sc
Browse files Browse the repository at this point in the history
Feature/sc
  • Loading branch information
alexeybannov authored Oct 28, 2021
2 parents 40dc6a8 + 08205c2 commit 8c7815d
Show file tree
Hide file tree
Showing 72 changed files with 269 additions and 156 deletions.
37 changes: 37 additions & 0 deletions ASC.Web.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"solution": {
"path": "ASC.Web.sln",
"projects": [
"common\\ASC.Api.Core\\ASC.Api.Core.csproj",
"common\\ASC.Common\\ASC.Common.csproj",
"common\\ASC.Core.Common\\ASC.Core.Common.csproj",
"common\\ASC.Data.Backup.Core\\ASC.Data.Backup.Core.csproj",
"common\\ASC.Data.Reassigns\\ASC.Data.Reassigns.csproj",
"common\\ASC.Data.Storage\\ASC.Data.Storage.csproj",
"common\\ASC.FederatedLogin\\ASC.FederatedLogin.csproj",
"common\\ASC.Feed\\ASC.Feed.csproj",
"common\\ASC.IPSecurity\\ASC.IPSecurity.csproj",
"common\\ASC.MessagingSystem\\ASC.MessagingSystem.csproj",
"common\\ASC.Notify.Textile\\ASC.Notify.Textile.csproj",
"common\\ASC.Textile\\ASC.Textile.csproj",
"common\\ASC.VoipService\\ASC.VoipService.csproj",
"common\\services\\ASC.AuditTrail\\ASC.AuditTrail.csproj",
"common\\services\\ASC.ClearEvents\\ASC.ClearEvents.csproj",
"common\\services\\ASC.Data.Backup\\ASC.Data.Backup.csproj",
"common\\services\\ASC.ElasticSearch\\ASC.ElasticSearch.csproj",
"common\\services\\ASC.Feed.Aggregator\\ASC.Feed.Aggregator.csproj",
"common\\services\\ASC.Notify\\ASC.Notify.csproj",
"common\\services\\ASC.Studio.Notify\\ASC.Studio.Notify.csproj",
"common\\services\\ASC.TelegramService\\ASC.TelegramService.csproj",
"common\\services\\ASC.UrlShortener.Svc\\ASC.UrlShortener.Svc.csproj",
"products\\ASC.Files\\Core\\ASC.Files.Core.csproj",
"products\\ASC.Files\\Server\\ASC.Files.csproj",
"products\\ASC.Files\\Service\\ASC.Files.Service.csproj",
"products\\ASC.People\\Server\\ASC.People.csproj",
"web\\ASC.Web.Api\\ASC.Web.Api.csproj",
"web\\ASC.Web.Core\\ASC.Web.Core.csproj",
"web\\ASC.Web.HealthChecks.UI\\ASC.Web.HealthChecks.UI.csproj",
"web\\ASC.Web.Studio\\ASC.Web.Studio.csproj"
]
}
}
18 changes: 12 additions & 6 deletions build/build.backend.bat
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
call build/createMigrations.bat
PUSHD %~dp0..
dotnet build ASC.Web.sln /fl1 /flp1:LogFile=build/ASC.Web.log;Verbosity=Normal

dotnet build ASC.Web.slnf /fl1 /flp1:LogFile=build/ASC.Web.log;Verbosity=Normal
@echo off
echo.
echo Install nodejs projects dependencies...
echo.

if %errorlevel% == 0 (
for /R "build\scripts\" %%f in (*.sh) do (
echo "%%~nxf"
for /R "build\scripts\" %%f in (*.bat) do (
echo Run script %%~nxf...
echo.
call build\scripts\%%~nxf
)
)

pause
echo.

if "%1"=="nopause" goto start
pause
:start
29 changes: 21 additions & 8 deletions build/build.static.bat
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
@echo off

PUSHD %~dp0
call runasadmin.bat "%~dpnx0"

if %errorlevel% == 0 (
PUSHD %~dp0..

echo "mode=%1"
IF "%2"=="personal" (
echo "mode=%2"
) ELSE (
echo "mode="
)

REM call yarn wipe
call yarn install

REM call yarn build
IF "%1"=="" (
call yarn build
) ELSE (
IF "%2"=="personal" (
call yarn build:personal
) ELSE (
call yarn build
)

REM call yarn wipe
IF "%1"=="" (
call yarn deploy
) ELSE (
IF "%2"=="personal" (
call yarn deploy:personal
) ELSE (
call yarn deploy
)

REM copy nginx configurations to deploy folder
Expand All @@ -40,10 +47,16 @@ powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-projects.co
powershell -Command "(gc build\deploy\nginx\sites-enabled\onlyoffice-studio.conf) -replace 'ROOTPATH', '%~dp0deploy\studio\client' -replace '\\', '/' | Out-File -encoding ASCII build\deploy\nginx\sites-enabled\onlyoffice-studio.conf"

REM restart nginx
echo service nginx stop
call sc stop nginx

REM sleep 5 seconds
call ping 127.0.0.1 -n 6 > nul

echo service nginx start
call sc start nginx
)
)

if "%1"=="nopause" goto start
pause
:start
8 changes: 4 additions & 4 deletions build/buildAndDeploy.PERSONAL.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ PUSHD %~dp0
call runasadmin.bat "%~dpnx0"
if %errorlevel% == 0 (

call start\stop.bat
call start\stop.bat nopause

PUSHD %~dp0..

echo "FRONT-END static"
call build\build.static.bat --personal
call build\build.static.bat nopause personal

echo "BACK-END"
call build\build.backend.bat
call build\build.backend.bat nopause

start /b call build\start\start.bat
start /b call build\start\start.bat nopause

pause
)
12 changes: 8 additions & 4 deletions build/buildAndDeploy.bat
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
@echo off
PUSHD %~dp0
setlocal EnableDelayedExpansion

call runasadmin.bat "%~dpnx0"

if %errorlevel% == 0 (

call start\stop.bat
call start\stop.bat nopause

PUSHD %~dp0..

echo "FRONT-END static"
call build\build.static.bat
call build\build.static.bat nopause

echo "BACK-END"
call build\build.backend.bat
call build\build.backend.bat nopause

start /b call build\start\start.bat
call build\start\start.bat nopause

pause
)
17 changes: 12 additions & 5 deletions build/install/install.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
PUSHD %~dp0..
call runasadmin.bat "%~dpnx0"
@echo off

PUSHD %~dp0..\..
setlocal EnableDelayedExpansion

if %errorlevel% == 0 (
for /R "run\" %%f in (*.bat) do (
call nssm install Onlyoffice%%~nf "%%~f"
for /R "build\run\" %%f in (*.bat) do (
call build\run\%%~nxf
echo service create "Onlyoffice%%~nf"
call sc create "Onlyoffice%%~nf" displayname= "ONLYOFFICE %%~nf" binPath= "!servicepath!"
)
)
)

echo.
pause
11 changes: 9 additions & 2 deletions build/install/uninstall.bat
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
@echo off

PUSHD %~dp0..
call runasadmin.bat "%~dpnx0"

if %errorlevel% == 0 (
for /R "run\" %%f in (*.bat) do (
call nssm remove Onlyoffice%%~nf
echo Running service stop and delete "Onlyoffice%%~nf"
call sc stop "Onlyoffice%%~nf"
call sc delete "Onlyoffice%%~nf"
)
)
)

echo.
pause
2 changes: 0 additions & 2 deletions build/run/ApiSystemService.bat

This file was deleted.

6 changes: 4 additions & 2 deletions build/run/BackupService.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.Backup"
call dotnet run --project ..\..\common\services\ASC.Data.Backup\ASC.Data.Backup.csproj --no-build --$STORAGE_ROOT=..\..\..\Data --log__dir=..\..\..\Logs --log__name=backup
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\common\services\ASC.Data.Backup\bin\Debug\ASC.Data.Backup.exe urls=http://0.0.0.0:5012 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=backup pathToConf=%cd%\config core:products:folder=%cd%\products
2 changes: 0 additions & 2 deletions build/run/CalendarServer.bat

This file was deleted.

6 changes: 4 additions & 2 deletions build/run/ClearEvents.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.ClearEvents"
call dotnet run --project ..\..\common\services\ASC.ClearEvents\ASC.ClearEvents.csproj --no-build --$STORAGE_ROOT=..\..\Data --log__dir=..\..\Logs --log__name=clearEvents
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\common\services\ASC.ClearEvents\bin\Debug\ASC.ClearEvents.exe urls=http://0.0.0.0:5027 $STORAGE_ROOT=%cd%\Data pathToConf=%cd%\config log:dir=%cd%\Logs log:name=clearEvents core:products:folder=%cd%\products
2 changes: 0 additions & 2 deletions build/run/CrmBackgroundTasks.bat

This file was deleted.

2 changes: 0 additions & 2 deletions build/run/CrmServer.bat

This file was deleted.

2 changes: 0 additions & 2 deletions build/run/EncryptionService.bat

This file was deleted.

6 changes: 4 additions & 2 deletions build/run/FileServer.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.Files"
call dotnet run --project ..\..\products\ASC.Files\Server\ASC.Files.csproj --no-build --$STORAGE_ROOT=..\..\..\Data --log__dir=..\..\..\Logs --log__name=files
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\products\ASC.Files\Server\bin\Debug\ASC.Files.exe urls=http://0.0.0.0:5007 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=files pathToConf=%cd%\config core:products:folder=%cd%\products
6 changes: 4 additions & 2 deletions build/run/FileService.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.Files"
call dotnet run --project ..\..\products\ASC.Files\Service\ASC.Files.Service.csproj --no-build --$STORAGE_ROOT=..\..\..\Data --log__dir=..\..\..\Logs --log__name=files
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\products\ASC.Files\Service\bin\Debug\ASC.Files.Service.exe urls=http://0.0.0.0:5009 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=files.service pathToConf=%cd%\config core:products:folder=%cd%\products
2 changes: 0 additions & 2 deletions build/run/MailServer.bat

This file was deleted.

2 changes: 0 additions & 2 deletions build/run/MigrationService.bat

This file was deleted.

6 changes: 4 additions & 2 deletions build/run/NotifyService.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.Notify"
call dotnet run --project ..\..\common\services\ASC.Notify\ASC.Notify.csproj --no-build --$STORAGE_ROOT=..\..\..\Data --log__dir=..\..\..\Logs --log__name=notify
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\common\services\ASC.Notify\bin\Debug\ASC.Notify.exe urls=http://0.0.0.0:5005 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=notify pathToConf=%cd%\config core:products:folder=%cd%\products
6 changes: 4 additions & 2 deletions build/run/PeopleServer.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.People"
call dotnet run --project ..\..\products\ASC.People\Server\ASC.People.csproj --no-build --$STORAGE_ROOT=..\..\..\Data --log__dir=..\..\..\Logs --log__name=people
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\products\ASC.People\Server\bin\Debug\ASC.People.exe urls=http://0.0.0.0:5004 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=people pathToConf=%cd%\config core:products:folder=%cd%\products
2 changes: 0 additions & 2 deletions build/run/ProjectsServer.bat

This file was deleted.

2 changes: 0 additions & 2 deletions build/run/Radicale.bat

This file was deleted.

2 changes: 0 additions & 2 deletions build/run/Socket.IO.bat

This file was deleted.

2 changes: 0 additions & 2 deletions build/run/SsoAuth.bat

This file was deleted.

6 changes: 4 additions & 2 deletions build/run/StudioNotifyService.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.Studio.Notify"
call dotnet run --project ..\..\common\services\ASC.Studio.Notify\ASC.Studio.Notify.csproj --no-build --$STORAGE_ROOT=..\..\..\Data --log__dir=..\..\..\Logs --log__name=studio.notify
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\common\services\ASC.Studio.Notify\bin\Debug\ASC.Studio.Notify.exe urls=http://0.0.0.0:5006 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=studio.notify pathToConf=%cd%\config core:products:folder=%cd%\products
6 changes: 4 additions & 2 deletions build/run/TelegramService.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.TelegramService"
call dotnet run --project ..\..\common\services\ASC.TelegramService\ASC.TelegramService.csproj --no-build --$STORAGE_ROOT=..\..\Data --log__dir=..\..\Logs --log__name=telegram
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\common\services\ASC.TelegramService\bin\Debug\ASC.TelegramService.exe urls=http://0.0.0.0:51702 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=telegram pathToConf=%cd%\config
2 changes: 0 additions & 2 deletions build/run/Thumbnails.bat

This file was deleted.

6 changes: 4 additions & 2 deletions build/run/UrlShortenerService.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.UrlShortener.Svc"
call dotnet run --project ..\..\common\services\ASC.UrlShortener.Svc\ASC.UrlShortener.Svc.csproj --no-build --$STORAGE_ROOT=..\..\..\Data --log__dir=..\..\..\Logs --log__name=urlshortener
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\common\services\ASC.UrlShortener.Svc\bin\Debug\ASC.UrlShortener.Svc.exe urls=http://0.0.0.0:5029 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=urlshortener pathToConf=%cd%\config core:products:folder=%cd%\products core:products:subfolder=server
6 changes: 4 additions & 2 deletions build/run/WebApi.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.Web.Api"
call dotnet run --project ..\..\web\ASC.Web.Api\ASC.Web.Api.csproj --no-build --$STORAGE_ROOT=..\..\Data --log__dir=..\..\Logs --log__name=api
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\web\ASC.Web.Api\bin\Debug\ASC.Web.Api.exe urls=http://0.0.0.0:5000 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=api pathToConf=%cd%\config core:products:folder=%cd%\products
6 changes: 4 additions & 2 deletions build/run/WebHealthChecksUI.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.Web.HealthChecks.UI"
call dotnet run --project ..\..\web\ASC.Web.HealthChecks.UI\ASC.Web.HealthChecks.UI.csproj --no-build
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\web\ASC.Web.HealthChecks.UI\bin\Debug\ASC.Web.HealthChecks.UI.exe urls=http://0.0.0.0:5027
6 changes: 4 additions & 2 deletions build/run/WebStudio.bat
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
echo "RUN ASC.Web.Studio"
call dotnet run --project ..\..\web\ASC.Web.Studio\ASC.Web.Studio.csproj --no-build --$STORAGE_ROOT=..\..\Data --log__dir=..\..\Logs --log__name=studio
@echo off

PUSHD %~dp0..\..
set servicepath=%cd%\web\ASC.Web.Studio\bin\Debug\ASC.Web.Studio.exe urls=http://0.0.0.0:5003 $STORAGE_ROOT=%cd%\Data log:dir=%cd%\Logs log:name=studio pathToConf=%cd%\config core:products:folder=%cd%\products
1 change: 0 additions & 1 deletion build/scripts/socket.sh

This file was deleted.

1 change: 0 additions & 1 deletion build/scripts/ssoauth.sh

This file was deleted.

1 change: 0 additions & 1 deletion build/scripts/thumbnails.sh

This file was deleted.

1 change: 1 addition & 0 deletions build/scripts/urlshortener.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn install --cwd common/ASC.UrlShortener/ --frozen-lockfile
1 change: 0 additions & 1 deletion build/scripts/urlshortener.sh

This file was deleted.

Loading

0 comments on commit 8c7815d

Please sign in to comment.