-
-
Notifications
You must be signed in to change notification settings - Fork 251
Expand file tree
/
Copy pathstart-all-services.ps1
More file actions
21 lines (18 loc) · 903 Bytes
/
start-all-services.ps1
File metadata and controls
21 lines (18 loc) · 903 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$parentDirectory = Split-Path -Path $PSScriptRoot -Parent
$directories = Get-ChildItem -Path $parentDirectory -Directory -Filter "Foundatio.*"
foreach ($directory in $directories) {
$startScriptPath = Join-Path -Path $directory.FullName -ChildPath "start-services.ps1"
$composeFilePath = Join-Path -Path $directory.FullName -ChildPath "docker-compose.yml"
if (Test-Path -Path $startScriptPath) {
Set-Location -Path $directory.FullName
Write-Host "Starting services in directory using start-services.ps1: $($directory.FullName)"
& $startScriptPath
}
elseif (Test-Path -Path $composeFilePath) {
Set-Location -Path $directory.FullName
Write-Host "Starting services in directory: $($directory.FullName)"
docker compose -f $composeFilePath up --detach
}
}
Write-Host "Services started successfully."
Set-Location -Path $PSScriptRoot