-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdeploy-docker.ps1
More file actions
47 lines (39 loc) · 1.53 KB
/
deploy-docker.ps1
File metadata and controls
47 lines (39 loc) · 1.53 KB
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Docker Deployment Script for Delivery App
# Run this script from the Delivery App root directory
Write-Host "=====================================" -ForegroundColor Cyan
Write-Host " Delivery App - Docker Deployment " -ForegroundColor Cyan
Write-Host "=====================================" -ForegroundColor Cyan
Write-Host ""
# Check if Docker is running
try {
docker info | Out-Null
Write-Host "Docker is running" -ForegroundColor Green
} catch {
Write-Host "Error: Docker is not running. Please start Docker Desktop first." -ForegroundColor Red
exit 1
}
# Build and start services
Write-Host "Building and starting services..." -ForegroundColor Yellow
docker-compose down
Write-Host ""
docker-compose build --no-cache
Write-Host ""
docker-compose up -d
Write-Host ""
# Wait for services to be ready
Write-Host "Waiting for services to start..." -ForegroundColor Yellow
Start-Sleep -Seconds 30
# Check service status
Write-Host ""
Write-Host "Service Status:" -ForegroundColor Cyan
docker-compose ps
Write-Host ""
Write-Host "=====================================" -ForegroundColor Green
Write-Host " Deployment Complete! " -ForegroundColor Green
Write-Host "=====================================" -ForegroundColor Green
Write-Host ""
Write-Host "Frontend: http://localhost" -ForegroundColor White
Write-Host "Backend: http://localhost:8080" -ForegroundColor White
Write-Host ""
Write-Host "To view logs: docker-compose logs -f" -ForegroundColor Gray
Write-Host "To stop: docker-compose down" -ForegroundColor Gray