Removed old scripts for dщслук dev

This commit is contained in:
Alexey Safronov 2023-11-08 18:26:04 +04:00
parent bb10d8e3c6
commit a24bbec130
16 changed files with 0 additions and 610 deletions

View File

@ -1,7 +0,0 @@
@echo off
pwsh %~dp0/build.backend.docker.ps1 %*
echo.
pause

View File

@ -1,133 +0,0 @@
param(
[switch] $h = $false,
[switch] $f = $false,
[switch] $s = $true,
[switch] $c = $false,
[switch] $d = $false
)
if ($h) {
Write-Host "Build and run backend and working environment. (Use 'yarn start' to run client -> https://github.com/ONLYOFFICE/DocSpace-client)"
Write-Host
Write-Host "Syntax: available params [-h|f|s|c|d|]"
Write-Host "Options:"
Write-Host "h Print this Help."
Write-Host "f Force rebuild base images."
Write-Host "s Run as SAAS otherwise as STANDALONE."
Write-Host "c Run as COMMUNITY otherwise ENTERPRISE."
Write-Host "d Run dnsmasq."
Write-Host
exit
}
$PSversionMajor = $PSVersionTable.PSVersion | sort-object major | ForEach-Object { $_.major }
$PSversionMinor = $PSVersionTable.PSVersion | sort-object minor | ForEach-Object { $_.minor }
if ($PSversionMajor -lt 7 -or $PSversionMinor -lt 2) {
Write-Error "Powershell version must be greater than or equal to 7.2."
exit
}
$RootDir = Split-Path -Parent $PSScriptRoot
$DockerDir = "$RootDir\buildtools\install\docker"
$LocalIp = (Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration | Where-Object { $_.DHCPEnabled -ne $null -and $_.DefaultIPGateway -ne $null }).IPAddress | Select-Object -First 1
$Doceditor = ($LocalIp + ":5013")
$Login = ($LocalIp + ":5011")
$Client = ($LocalIp + ":5001")
$PortalUrl = ("http://" + $LocalIp)
$ProxyVersion="v1.0.0"
# Stop all backend services"
& "$PSScriptRoot\start\stop.backend.docker.ps1"
$Env:COMPOSE_IGNORE_ORPHANS = "True"
$ExistsNetwork= docker network ls --format '{{.Name}}' | findstr "onlyoffice"
if (-not $ExistsNetwork) {
docker network create --driver bridge onlyoffice
}
Write-Host "Run MySQL" -ForegroundColor Green
docker compose -f "$DockerDir\db.yml" up -d
if ($d) {
Write-Host "Run local dns server" -ForegroundColor Green
$Env:ROOT_DIR=$RootDir
docker compose -f "$DockerDir\dnsmasq.yml" up -d
}
Write-Host "Build backend services (to `publish/` folder)" -ForegroundColor Green
& "$PSScriptRoot\install\common\build-services.ps1"
$Env:DOCUMENT_SERVER_IMAGE_NAME = "onlyoffice/documentserver-de:latest"
$Env:INSTALLATION_TYPE = "ENTERPRISE"
$Env:MIGRATION_TYPE = "STANDALONE"
if ($c) {
$Env:DOCUMENT_SERVER_IMAGE_NAME = "onlyoffice/documentserver:latest"
$Env:INSTALLATION_TYPE = "COMMUNITY"
}
if (-not $s) {
$Env:MIGRATION_TYPE = "SAAS"
}
Set-Location -Path $RootDir
$DotnetVersion = "dev"
$NodeVersion = "dev"
$ProxyVersion = "dev"
$ExistsDotnet= docker images --format "{{.Repository}}:{{.Tag}}" | findstr "onlyoffice/4testing-docspace-dotnet-runtime:$DotnetVersion"
$ExistsNode= docker images --format "{{.Repository}}:{{.Tag}}" | findstr "onlyoffice/4testing-docspace-nodejs-runtime:$NodeVersion"
$ExistsProxy= docker images --format "{{.Repository}}:{{.Tag}}" | findstr "onlyoffice/4testing-docspace-proxy-runtime:$ProxyVersion"
if (!$ExistsDotnet -or $f) {
Write-Host "Build dotnet base image from source (apply new dotnet config)" -ForegroundColor Green
docker build -t "onlyoffice/4testing-docspace-dotnet-runtime:$DotnetVersion" -f "$DockerDir\Dockerfile.runtime" --target dotnetrun .
} else {
Write-Host "SKIP build dotnet base image (already exists)" -ForegroundColor Blue
}
if (!$ExistsNode -or $f) {
Write-Host "Build node base image from source" -ForegroundColor Green
docker build -t "onlyoffice/4testing-docspace-nodejs-runtime:$NodeVersion" -f "$DockerDir\Dockerfile.runtime" --target noderun .
} else {
Write-Host "SKIP build node base image (already exists)" -ForegroundColor Blue
}
if (!$ExistsProxy -or $f) {
Write-Host "Build proxy base image from source (apply new nginx config)" -ForegroundColor Green
docker build -t "onlyoffice/4testing-docspace-proxy-runtime:$ProxyVersion" -f "$DockerDir\Dockerfile.runtime" --target router .
} else {
Write-Host "SKIP build proxy base image (already exists)" -ForegroundColor Blue
}
Write-Host "Run migration and services" -ForegroundColor Green
$Env:ENV_EXTENSION="dev"
$Env:Baseimage_Dotnet_Run="onlyoffice/4testing-docspace-dotnet-runtime:$DotnetVersion"
$Env:Baseimage_Nodejs_Run="onlyoffice/4testing-docspace-nodejs-runtime:$NodeVersion"
$Env:Baseimage_Proxy_Run="onlyoffice/4testing-docspace-proxy-runtime:$ProxyVersion"
$Env:SERVICE_DOCEDITOR=$Doceditor
$Env:SERVICE_LOGIN=$Login
$Env:SERVICE_CLIENT=$Client
$Env:ROOT_DIR=$RootDir
$Env:BUILD_PATH="/var/www"
$Env:SRC_PATH="$RootDir\publish\services"
$Env:DATA_DIR="$RootDir\data"
$Env:APP_URL_PORTAL=$PortalUrl
docker compose -f "$DockerDir\docspace.profiles.yml" -f "$DockerDir\docspace.overcome.yml" --profile migration-runner --profile backend-local up -d
Write-Host "== Build params ==" -ForegroundColor Green
Write-Host "APP_URL_PORTAL: $PortalUrl" -ForegroundColor Blue
Write-Host "LOCAL IP: $LocalIp" -ForegroundColor Blue
Write-Host "SERVICE_DOCEDITOR: $Env:SERVICE_DOCEDITOR" -ForegroundColor Blue
Write-Host "SERVICE_LOGIN: $Env:SERVICE_LOGIN" -ForegroundColor Blue
Write-Host "SERVICE_CLIENT: $Env:SERVICE_CLIENT" -ForegroundColor Blue
Write-Host "INSTALLATION_TYPE: $Env:INSTALLATION_TYPE" -ForegroundColor Blue
Write-Host "MIGRATION TYPE: $Env:MIGRATION_TYPE" -ForegroundColor Blue
Write-Host "DS IMAGE: $Env:DOCUMENT_SERVER_IMAGE_NAME" -ForegroundColor Blue
Set-Location -Path $PSScriptRoot

View File

@ -1,203 +0,0 @@
#!/bin/bash
############################################################
# Help #
############################################################
Help()
{
# Display Help
echo "Build and run backend and working environment. (Use 'yarn start' to run client -> https://github.com/ONLYOFFICE/DocSpace-client)"
echo
echo "Syntax: available params [-h|f|s|c|d|]"
echo "options:"
echo "h Print this Help."
echo "f Force rebuild base images."
echo "s Run as SAAS otherwise as STANDALONE."
echo "c Run as COMMUNITY otherwise ENTERPRISE."
echo "d Run dnsmasq."
echo
}
rd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
dir=$(builtin cd $rd/../; pwd)
dockerDir="$dir/buildtools/install/docker"
local_ip=$(ipconfig getifaddr en0)
doceditor=${local_ip}:5013
login=${local_ip}:5011
client=${local_ip}:5001
portal_url="http://$local_ip"
force=false
dns=false
standalone=true
community=false
migration_type="STANDALONE" # SAAS
installation_type=ENTERPRISE
document_server_image_name=onlyoffice/documentserver-de:latest
# Get the options
while getopts "h:f:s:c:d:" opt; do
echo "argument -${opt} called with parameter $OPTARG" >&2
case $opt in
h) # Display this Help
Help
exit
;;
f) # Force rebuild base images
force=${OPTARG:-true}
;;
s) # Run as STANDALONE (otherwise SAAS)
standalone=${OPTARG:-true}
;;
c) # Run as COMMUNITY (otherwise ENTERPRISE)
community=${OPTARG:-true}
;;
d) # Run dnsmasq
dns=${OPTARG:-true}
;;
\?) # Invalid option
echo "Error: Invalid '-$OPTARG' option"
exit
;;
esac
done
echo "Run script directory:" $dir
echo "Root directory:" $dir
echo "Docker files root directory:" $dockerDir
echo
echo "SERVICE_DOCEDITOR: $doceditor"
echo "SERVICE_LOGIN: $login"
echo "SERVICE_CLIENT: $client"
echo "DOCSPACE_APP_URL: $portal_url"
echo
echo "FORCE REBUILD BASE IMAGES: $force"
echo "Run dnsmasq: $dns"
if [ "$standalone" = false ]; then
migration_type="SAAS"
fi
if [ "$community" = true ]; then
installation_type="COMMUNITY"
document_server_image_name=onlyoffice/documentserver:latest
fi
echo
echo "MIGRATION TYPE: $migration_type"
echo "INSTALLATION TYPE: $installation_type"
echo "DS image: $document_server_image_name"
echo
# Stop all backend services"
$dir/buildtools/start/stop.backend.docker.sh
echo "Run MySQL"
arch_name="$(uname -m)"
existsnetwork=$(docker network ls | awk '{print $2;}' | { grep -x onlyoffice || true; });
if [[ -z ${existsnetwork} ]]; then
docker network create --driver bridge onlyoffice
fi
if [ "${arch_name}" = "x86_64" ]; then
echo "CPU Type: x86_64 -> run db.yml"
docker compose -f $dockerDir/db.yml up -d
elif [ "${arch_name}" = "arm64" ]; then
echo "CPU Type: arm64 -> run db.yml with arm64v8 image"
MYSQL_IMAGE=arm64v8/mysql:8.0.32-oracle \
docker compose -f $dockerDir/db.yml up -d
else
echo "Error: Unknown CPU Type: ${arch_name}."
exit 1
fi
if [ "$dns" = true ]; then
echo "Run local dns server"
ROOT_DIR=$dir \
docker compose -f $dockerDir/dnsmasq.yml up -d
fi
echo "Clear publish folder"
rm -rf $dir/publish/services
echo "Build backend services (to "publish/" folder)"
bash $dir/buildtools/install/common/build-services.sh -pb backend-publish -pc Debug -de "$dockerDir/docker-entrypoint.py"
dotnet_version=dev
exists=$(docker images | egrep "onlyoffice/4testing-docspace-dotnet-runtime" | egrep "$dotnet_version" | awk 'NR>0 {print $1 ":" $2}')
if [ "${exists}" = "" ] || [ "$force" = true ]; then
echo "Build dotnet base image from source (apply new dotnet config)"
docker build -t onlyoffice/4testing-docspace-dotnet-runtime:$dotnet_version -f $dockerDir/Dockerfile.runtime --target dotnetrun .
else
echo "SKIP build dotnet base image (already exists)"
fi
node_version=dev
exists=$(docker images | egrep "onlyoffice/4testing-docspace-nodejs-runtime" | egrep "$node_version" | awk 'NR>0 {print $1 ":" $2}')
if [ "${exists}" = "" ] || [ "$force" = true ]; then
echo "Build nodejs base image from source"
docker build -t onlyoffice/4testing-docspace-nodejs-runtime:$node_version -f $dockerDir/Dockerfile.runtime --target noderun .
else
echo "SKIP build nodejs base image (already exists)"
fi
proxy_version=dev
exists=$(docker images | egrep "onlyoffice/4testing-docspace-proxy-runtime" | egrep "$proxy_version" | awk 'NR>0 {print $1 ":" $2}')
if [ "${exists}" = "" ] || [ "$force" = true ]; then
echo "Build proxy base image from source (apply new nginx config)"
docker build -t onlyoffice/4testing-docspace-proxy-runtime:$proxy_version -f $dockerDir/Dockerfile.runtime --target router .
else
echo "SKIP build proxy base image (already exists)"
fi
echo "Run migration and services"
ENV_EXTENSION="dev" \
INSTALLATION_TYPE=$installation_type \
Baseimage_Dotnet_Run="onlyoffice/4testing-docspace-dotnet-runtime:$dotnet_version" \
Baseimage_Nodejs_Run="onlyoffice/4testing-docspace-nodejs-runtime:$node_version" \
Baseimage_Proxy_Run="onlyoffice/4testing-docspace-proxy-runtime:$proxy_version" \
DOCUMENT_SERVER_IMAGE_NAME=$document_server_image_name \
SERVICE_DOCEDITOR=$doceditor \
SERVICE_LOGIN=$login \
SERVICE_CLIENT=$client \
ROOT_DIR=$dir \
BUILD_PATH="/var/www" \
SRC_PATH="$dir/publish/services" \
DATA_DIR="$dir/data" \
APP_URL_PORTAL=$portal_url \
MIGRATION_TYPE=$migration_type \
docker-compose -f $dockerDir/docspace.profiles.yml -f $dockerDir/docspace.overcome.yml --profile migration-runner --profile backend-local up -d
echo
echo "Run script directory:" $dir
echo "Root directory:" $dir
echo "Docker files root directory:" $dockerDir
echo
echo "SERVICE_DOCEDITOR: $doceditor"
echo "SERVICE_LOGIN: $login"
echo "SERVICE_CLIENT: $client"
echo "DOCSPACE_APP_URL: $portal_url"
echo
echo "FORCE REBUILD BASE IMAGES: $force"
echo "Run dnsmasq: $dns"
echo
echo "MIGRATION TYPE: $migration_type"
echo "INSTALLATION TYPE: $installation_type"
echo "DS image: $document_server_image_name"
echo

View File

@ -1,7 +0,0 @@
@echo off
pwsh %~dp0/clear.backend.docker.ps1
echo.
pause

View File

@ -1,37 +0,0 @@
$Containers = docker ps -aqf "name=^onlyoffice"
$Images = docker images onlyoffice/4testing-docspace* -q
$RootDir = Split-Path -Parent $PSScriptRoot
$DockerDir = ($RootDir + "\buildtools\install\docker")
Write-Host "Clean up containers, volumes or networks" -ForegroundColor Green
if ($Containers -or $Images) {
Write-Host "Remove all backend containers" -ForegroundColor Blue
$Env:DOCUMENT_SERVER_IMAGE_NAME="onlyoffice/documentserver-de:latest"
$Env:Baseimage_Dotnet_Run="onlyoffice/4testing-docspace-dotnet-runtime:dev"
$Env:Baseimage_Nodejs_Run="onlyoffice/4testing-docspace-nodejs-runtime:dev"
$Env:Baseimage_Proxy_Run="onlyoffice/4testing-docspace-proxy-runtime:dev"
$Env:SERVICE_CLIENT="localhost:5001"
$Env:BUILD_PATH="/var/www"
$Env:SRC_PATH="$RootDir\publish\services"
$Env:ROOT_DIR=$RootDir
$Env:DATA_DIR="$RootDir\data"
docker compose -f "$DockerDir\docspace.profiles.yml" -f "$DockerDir\docspace.overcome.yml" --profile "migration-runner" --profile "backend-local" down --volumes
Write-Host "Remove docker contatiners 'mysql'" -ForegroundColor Blue
docker compose -f "$DockerDir\db.yml" down --volumes
Write-Host "Remove docker volumes" -ForegroundColor Blue
docker volume prune -f -a
Write-Host "Remove docker base images (onlyoffice/4testing-docspace)" -ForegroundColor Blue
docker rmi -f $Images
Write-Host "Remove docker networks" -ForegroundColor Blue
docker network prune -f
}
else {
Write-Host "No containers, images, volumes or networks to clean up" -ForegroundColor Green
}

View File

@ -1,38 +0,0 @@
#!/bin/bash
Containers=$(docker ps -a | egrep "onlyoffice" | awk 'NR>0 {print $1}')
RunDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
RootDir=$(builtin cd $RunDir/../; pwd)
DockerDir="${RootDir}/buildtools/install/docker"
echo "Clean up containers, volumes or networks"
if [[ $Containers != "" ]]
then
echo "Remove all backend containers"
DOCUMENT_SERVER_IMAGE_NAME=onlyoffice/documentserver-de:latest \
Baseimage_Dotnet_Run="onlyoffice/4testing-docspace-dotnet-runtime:dev" \
Baseimage_Nodejs_Run="onlyoffice/4testing-docspace-nodejs-runtime:dev" \
Baseimage_Proxy_Run="onlyoffice/4testing-docspace-proxy-runtime:dev" \
SERVICE_CLIENT="localhost:5001" \
BUILD_PATH="/var/www" \
SRC_PATH="${RootDir}/publish/services" \
ROOT_DIR=$RootDir \
DATA_DIR="${RootDir}/data" \
docker-compose -f "${DockerDir}/docspace.profiles.yml" -f "${DockerDir}/docspace.overcome.yml" --profile migration-runner --profile backend-local down --volumes
echo "Remove docker contatiners 'mysql'"
docker compose -f "${DockerDir}/db.yml" down --volumes
echo "Remove docker volumes"
docker volume prune -f -a
echo "Remove docker base images (onlyoffice/4testing-docspace)"
docker rmi -f $(docker images -a | egrep "onlyoffice/4testing-docspace" | awk 'NR>0 {print $3}')
echo "Remove unused networks."
docker network prune -f
else
echo "No containers, images, volumes or networks to clean up"
fi

View File

@ -1,57 +0,0 @@
$SRC_PATH=(get-item $PSScriptRoot ).parent.parent.parent.FullName
$BUILD_PATH="$SRC_PATH\publish"
$BACKEND_NODEJS_SERVICES="ASC.Socket.IO","ASC.SsoAuth"
$BACKEND_DOTNETCORE_SERVICES="ASC.Files", "ASC.People", "ASC.Data.Backup", "ASC.Files.Service", "ASC.Notify", "ASC.Studio.Notify", "ASC.Web.Api", "ASC.Web.Studio", "ASC.Data.Backup.BackgroundTasks", "ASC.ClearEvents", "ASC.ApiSystem", "ASC.Web.HealthChecks.UI"
$SELF_CONTAINED="false"
$PUBLISH_CNF="Debug"
$FRONTEND_BUILD_ARGS="build"
$FRONTEND_DEPLOY_ARGS="deploy"
$DEBUG_INFO_CHECK=""
$MIGRATION_CHECK="true"
$DOCKER_ENTRYPOINT="$SRC_PATH\buildtools\install\docker\docker-entrypoint.py"
if(Test-Path -Path "$BUILD_PATH\services" ){
Write-Host "== Clean up services ==" -ForegroundColor Green
Remove-Item "$BUILD_PATH\services" -Recurse
}
Write-Host "== Build ASC.Web.slnf ==" -ForegroundColor Green
dotnet build "$SRC_PATH\server\ASC.Web.slnf"
Write-Host "== Build ASC.Migrations.sln ==" -ForegroundColor Green
dotnet build "$SRC_PATH\server\ASC.Migrations.sln" -o "$BUILD_PATH\services\ASC.Migration.Runner\service\"
Write-Host "== Add docker-migration-entrypoint.sh to ASC.Migration.Runner ==" -ForegroundColor Green
$FilePath = "$BUILD_PATH\services\ASC.Migration.Runner\service\docker-migration-entrypoint.sh"
Get-Content "$SRC_PATH\buildtools\install\docker\docker-migration-entrypoint.sh" -raw | % {$_ -replace "`r", ""} | Set-Content -NoNewline $FilePath
foreach ($SERVICE in $BACKEND_NODEJS_SERVICES)
{
Write-Host "== Build $SERVICE project ==" -ForegroundColor Green
yarn install --cwd "$SRC_PATH\server\common\$SERVICE" --frozen-lockfile
$DST = "$BUILD_PATH\services\$SERVICE\service\"
if(!(Test-Path -Path $DST )){
New-Item -ItemType "directory" -Path $DST
}
Write-Host "== Copy service data to `publish\services\${SERVICE}\service` ==" -ForegroundColor Green
Copy-Item -Path "$SRC_PATH\server\common\$SERVICE\*" -Destination $DST -Recurse
Write-Host "== Add docker-entrypoint.py to $SERVICE ==" -ForegroundColor Green
Copy-Item $DOCKER_ENTRYPOINT -Destination $DST
}
Write-Host "== Publish ASC.Web.slnf ==" -ForegroundColor Green
dotnet publish "$SRC_PATH\server\ASC.Web.slnf" -p "PublishProfile=FolderProfile"
Set-Location -Path $PSScriptRoot
foreach ($SERVICE in $BACKEND_DOTNETCORE_SERVICES)
{
Write-Host "== Add docker-entrypoint.py to $SERVICE ==" -ForegroundColor Green
$DST = "$BUILD_PATH\services\$SERVICE\service\"
Copy-Item $DOCKER_ENTRYPOINT -Destination $DST
}

View File

@ -1,7 +0,0 @@
@echo off
pwsh %~dp0/restart.backend.docker.ps1 %*
echo.
pause

View File

@ -1,5 +0,0 @@
# Stop all backend services"
& "$PSScriptRoot\stop.backend.docker.ps1"
# Start all backend services"
& "$PSScriptRoot\start.backend.docker.ps1"

View File

@ -1,8 +0,0 @@
#!/bin/bash
dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "Root directory:" $dir
$dir/stop.backend.docker.sh
$dir/start.backend.docker.sh

View File

@ -1,7 +0,0 @@
@echo off
pwsh %~dp0/start.backend.docker.ps1 %*
echo.
pause

View File

@ -1,32 +0,0 @@
$PSversionMajor = $PSVersionTable.PSVersion | sort-object major | ForEach-Object { $_.major }
$PSversionMinor = $PSVersionTable.PSVersion | sort-object minor | ForEach-Object { $_.minor }
if ($PSversionMajor -lt 7 -or $PSversionMinor -lt 2) {
Write-Error "Powershell version must be greater than or equal to 7.2."
exit
}
$RootDir = Split-Path (Split-Path -Parent $PSScriptRoot) -Parent
$DockerDir = ($RootDir + "\buildtools\install\docker")
$LocalIp = (Get-CimInstance -ClassName Win32_NetworkAdapterConfiguration | Where-Object { $_.DHCPEnabled -ne $null -and $_.DefaultIPGateway -ne $null }).IPAddress | Select-Object -First 1
$Doceditor = ($LocalIp + ":5013")
$Login = ($LocalIp + ":5011")
$Client = ($LocalIp + ":5001")
Set-Location -Path $DockerDir
Write-Host "Start all services (containers)" -ForegroundColor Green
$Env:ENV_EXTENSION="dev"
$Env:Baseimage_Dotnet_Run="onlyoffice/4testing-docspace-dotnet-runtime:v1.0.0"
$Env:Baseimage_Nodejs_Run="onlyoffice/4testing-docspace-nodejs-runtime:v1.0.0"
$Env:Baseimage_Proxy_Run="onlyoffice/4testing-docspace-proxy-runtime:v1.0.0"
$Env:DOCUMENT_SERVER_IMAGE_NAME="onlyoffice/documentserver-de:latest"
$Env:SERVICE_DOCEDITOR=$Doceditor
$Env:SERVICE_LOGIN=$Login
$Env:SERVICE_CLIENT=$Client
$Env:ROOT_DIR=$RootDir
$Env:BUILD_PATH="/var/www"
$Env:SRC_PATH="$RootDir\publish\services"
$Env:DATA_DIR="$RootDir\data"
docker compose -f docspace.profiles.yml -f docspace.overcome.yml --profile migration-runner --profile backend-local start

View File

@ -1,41 +0,0 @@
#!/bin/bash
rd="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
echo "Run script directory:" $dir
dir=$(builtin cd $rd/../../; pwd)
echo "Root directory:" $dir
cd $dir/buildtools/install/docker/
docker_dir="$( pwd )"
echo "Docker directory:" $docker_dir
local_ip=$(ipconfig getifaddr en0)
echo "LOCAL IP: $local_ip"
doceditor=${local_ip}:5013
login=${local_ip}:5011
client=${local_ip}:5001
echo "SERVICE_DOCEDITOR: $doceditor"
echo "SERVICE_LOGIN: $login"
echo "SERVICE_CLIENT: $client"
Baseimage_Dotnet_Run="onlyoffice/4testing-docspace-dotnet-runtime:v1.0.0" \
Baseimage_Nodejs_Run="onlyoffice/4testing-docspace-nodejs-runtime:v1.0.0" \
Baseimage_Proxy_Run="onlyoffice/4testing-docspace-proxy-runtime:v1.0.0" \
BUILD_PATH="/var/www" \
SRC_PATH="$dir/publish/services" \
SERVICE_DOCEDITOR=$doceditor \
SERVICE_LOGIN=$login \
SERVICE_CLIENT=$client \
ROOT_DIR=$dir \
DATA_DIR="$dir/data" \
ENV_EXTENSION="dev" \
DOCUMENT_SERVER_IMAGE_NAME=onlyoffice/documentserver-de:latest \
docker-compose -f docspace.profiles.yml -f docspace.overcome.yml --profile backend-local start

View File

@ -1,7 +0,0 @@
@echo off
pwsh %~dp0/stop.backend.docker.ps1
echo.
pause

View File

@ -1,17 +0,0 @@
$PSversionMajor = $PSVersionTable.PSVersion | sort-object major | ForEach-Object { $_.major }
$PSversionMinor = $PSVersionTable.PSVersion | sort-object minor | ForEach-Object { $_.minor }
if ($PSversionMajor -lt 7 -or $PSversionMinor -lt 2) {
Write-Error "Powershell version must be greater than or equal to 7.2."
exit
}
$Containers = docker ps -a -f "name=^onlyoffice" --format="{{.ID}} {{.Names}}" | Select-String -Pattern ("mysql|rabbitmq|redis|elasticsearch|documentserver") -NotMatch | ConvertFrom-String | ForEach-Object P1
if (-not $Containers) {
Write-Host "No containers to stop" -ForegroundColor Blue
exit
}
Write-Host "Stop all backend services (containers)" -ForegroundColor Green
docker stop $Containers

View File

@ -1,4 +0,0 @@
#!/bin/bash
echo "Stop all backend services (containers)"
docker stop $(docker ps -a | egrep "onlyoffice" | egrep -v "mysql|rabbitmq|redis|elasticsearch|documentserver" | awk 'NR>0 {print $1}')