-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathupdate.ps1
More file actions
48 lines (38 loc) · 1.25 KB
/
update.ps1
File metadata and controls
48 lines (38 loc) · 1.25 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
48
# Logarr Update Script for Windows
# Updates Logarr to the latest version
$ErrorActionPreference = "Stop"
Write-Host "=== Logarr Update Script ===" -ForegroundColor Green
Write-Host ""
# Check if docker compose is available
try {
docker compose version | Out-Null
} catch {
Write-Host "Error: docker is not installed or not running" -ForegroundColor Red
exit 1
}
# Check if we're in the logarr directory
if (-not (Test-Path "docker-compose.yml")) {
Write-Host "Error: docker-compose.yml not found. Are you in the logarr directory?" -ForegroundColor Red
exit 1
}
# Stop running containers
Write-Host "Stopping containers..." -ForegroundColor Yellow
docker compose down
Write-Host ""
# Pull latest images
Write-Host "Pulling latest images..." -ForegroundColor Green
docker compose pull
Write-Host ""
# Start containers
Write-Host "Starting containers..." -ForegroundColor Yellow
docker compose up -d
Write-Host ""
# Wait for services
Write-Host "Waiting for services to start..." -ForegroundColor Yellow
Start-Sleep -Seconds 5
# Show status
Write-Host "Container status:" -ForegroundColor Green
docker compose ps
Write-Host ""
Write-Host "=== Update complete! ===" -ForegroundColor Green
Write-Host "Logarr should be running on http://localhost:3001"