feat: add deployment workflows for web, Android, Docker, macOS, and Linux
Build Images and Deploy / Update-PROD-Stack (push) Successful in 34s
Build Images and Deploy / Update-PROD-Stack (push) Successful in 34s
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
# Dibby Wemo Manager - Web Deployment Script (PowerShell)
|
||||
# This script builds and deploys the web version using Docker Compose
|
||||
|
||||
Write-Host "🚀 Deploying Dibby Wemo Manager (Web Version)..." -ForegroundColor Green
|
||||
|
||||
# Check if Docker is running
|
||||
try {
|
||||
docker info > $null 2>&1
|
||||
} catch {
|
||||
Write-Host "❌ Docker is not running. Please start Docker Desktop first." -ForegroundColor Red
|
||||
exit 1
|
||||
}
|
||||
|
||||
# Build the Docker image
|
||||
Write-Host "📦 Building Docker image..." -ForegroundColor Blue
|
||||
docker build -t reg.dev.nervesocket.com/dibbly:latest .
|
||||
|
||||
# Stop existing container if running
|
||||
Write-Host "🛑 Stopping existing container..." -ForegroundColor Yellow
|
||||
docker-compose -f web-compose.yml down 2>$null
|
||||
|
||||
# Start the service
|
||||
Write-Host "🔄 Starting web service..." -ForegroundColor Blue
|
||||
docker-compose -f web-compose.yml up -d
|
||||
|
||||
# Wait for service to be ready
|
||||
Write-Host "⏳ Waiting for service to be ready..." -ForegroundColor Yellow
|
||||
Start-Sleep -Seconds 10
|
||||
|
||||
# Check if service is running
|
||||
$serviceStatus = docker-compose -f web-compose.yml ps
|
||||
if ($serviceStatus -match "Up") {
|
||||
Write-Host "✅ Dibby Wemo Manager is now running!" -ForegroundColor Green
|
||||
Write-Host ""
|
||||
Write-Host "🌐 Access the web interface at:" -ForegroundColor Cyan
|
||||
Write-Host " http://localhost:3456"
|
||||
Write-Host ""
|
||||
Write-Host "📱 Mobile-friendly URL:" -ForegroundColor Cyan
|
||||
$localIP = (Get-NetIPAddress -AddressFamily IPv4 -InterfaceAlias "Ethernet*","Wi-Fi*" | Where-Object { $_.IPAddress -notlike "169.*" -and $_.IPAddress -notlike "127.*" } | Select-Object -First 1).IPAddress
|
||||
Write-Host " http://$($localIP):3456"
|
||||
Write-Host ""
|
||||
Write-Host "📊 View logs:" -ForegroundColor Cyan
|
||||
Write-Host " docker-compose -f web-compose.yml logs -f"
|
||||
Write-Host ""
|
||||
Write-Host "🛑 Stop service:" -ForegroundColor Cyan
|
||||
Write-Host " docker-compose -f web-compose.yml down"
|
||||
} else {
|
||||
Write-Host "❌ Failed to start the service. Check logs:" -ForegroundColor Red
|
||||
docker-compose -f web-compose.yml logs
|
||||
exit 1
|
||||
}
|
||||
Reference in New Issue
Block a user