forked from Ed-Fi-Alliance-OSS/Ed-Fi-ODS-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmulti-tenant-odscontexts-up.ps1
29 lines (24 loc) · 1.06 KB
/
multi-tenant-odscontexts-up.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
# SPDX-License-Identifier: Apache-2.0
# Licensed to the Ed-Fi Alliance under one or more agreements.
# The Ed-Fi Alliance licenses this file to you under the Apache License, Version 2.0.
# See the LICENSE and NOTICES files in the project root for more information.
param(
[ValidateSet('PostgreSQL')]
[string] $engineFolder = 'pgsql'
)
$composeFilePath = [IO.Path]::Combine($PSScriptRoot, 'Compose', $engineFolder, 'MultiTenant-OdsContext', 'compose-multi-tenant-odscontext-env.yml')
$composeOverrideFilePath = [IO.Path]::Combine($PSScriptRoot, 'Compose', $engineFolder, 'MultiTenant-OdsContext', 'compose-multi-tenant-odscontext-env.override.yml')
$envFilePath = [IO.Path]::Combine($PSScriptRoot, '.env')
$params = @(
"-f", $composeFilePath,
"--env-file", $envFilePath,
"-p", "multi-tenant-ods",
"up",
"-d",
"--remove-orphans"
)
# If the compose override exists, insert the -f parameter to get it merged
if (Test-Path $composeOverrideFilePath) {
$params = $params[0..1] + "-f" + $composeOverrideFilePath + $params[2..8]
}
& docker compose $params