Current directory: /home/klas4s23/domains/585455.klas4s23.mid-ica.nl/public_html/Gastenboek/uploads
# Quick Start Script for Docker
# Run this script to start the application with Docker
Write-Host "🐳 Starting English Vocabulary Learning Application with Docker..." -ForegroundColor Cyan
Write-Host ""
# Check if Docker is installed
Write-Host "Checking Docker installation..." -ForegroundColor Yellow
$dockerVersion = docker --version 2>$null
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Docker is not installed!" -ForegroundColor Red
Write-Host "Please install Docker Desktop from: https://www.docker.com/products/docker-desktop" -ForegroundColor Yellow
exit 1
}
Write-Host "✅ Docker found: $dockerVersion" -ForegroundColor Green
# Check if Docker is running
Write-Host "Checking if Docker is running..." -ForegroundColor Yellow
docker ps 2>$null | Out-Null
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Docker is not running!" -ForegroundColor Red
Write-Host "Please start Docker Desktop and try again." -ForegroundColor Yellow
exit 1
}
Write-Host "✅ Docker is running" -ForegroundColor Green
Write-Host ""
# Stop any existing containers
Write-Host "Stopping existing containers (if any)..." -ForegroundColor Yellow
docker-compose down 2>$null
Write-Host ""
# Start containers
Write-Host "🚀 Starting containers..." -ForegroundColor Cyan
docker-compose up -d
if ($LASTEXITCODE -ne 0) {
Write-Host "❌ Failed to start containers!" -ForegroundColor Red
Write-Host "Check the error messages above." -ForegroundColor Yellow
exit 1
}
Write-Host ""
Write-Host "⏳ Waiting for services to be ready..." -ForegroundColor Yellow
Start-Sleep -Seconds 10
# Check container status
Write-Host ""
Write-Host "📊 Container Status:" -ForegroundColor Cyan
docker-compose ps
Write-Host ""
Write-Host "✅ Application is ready!" -ForegroundColor Green
Write-Host ""
Write-Host "🌐 Access the application:" -ForegroundColor Cyan
Write-Host " Website: http://localhost" -ForegroundColor White
Write-Host " phpMyAdmin: http://localhost:8080" -ForegroundColor White
Write-Host ""
Write-Host "🔑 Database Credentials:" -ForegroundColor Cyan
Write-Host " Username: english_user" -ForegroundColor White
Write-Host " Password: english_pass" -ForegroundColor White
Write-Host ""
Write-Host "📝 Useful commands:" -ForegroundColor Cyan
Write-Host " Stop: docker-compose down" -ForegroundColor White
Write-Host " Restart: docker-compose restart" -ForegroundColor White
Write-Host " Logs: docker-compose logs -f" -ForegroundColor White
Write-Host ""
Write-Host "Press any key to open the application in your browser..." -ForegroundColor Yellow
$null = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")
Start-Process "http://localhost"