-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker_deploy.ps1
More file actions
25 lines (24 loc) · 882 Bytes
/
docker_deploy.ps1
File metadata and controls
25 lines (24 loc) · 882 Bytes
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
Write-Host "Building the Angular client Docker image..."
Set-Location -Path "./TheLibraryA"
docker build -t the_library-angular-client:latest .
if ($LASTEXITCODE -ne 0) {
Write-Host "Failed to build the Angular client Docker image"
exit 1
}
Write-Host "Angular client Docker image built"
Write-Host "Building the Spring server Docker image..."
Set-Location -Path "../TheLibraryj"
docker build -t the_library-spring-server:latest .
if ($LASTEXITCODE -ne 0) {
Write-Host "Failed to build the Spring server Docker image"
exit 1
}
Write-Host "Spring server Docker image built"
Set-Location -Path ".."
Write-Host "Deploying the Docker stack..."
docker stack deploy --compose-file docker-compose.yml the_library
if ($LASTEXITCODE -ne 0) {
Write-Host "Failed to deploy the Docker stack"
exit 1
}
Write-Host "Docker stack deployed as 'the_library' (without quotes)"