docs: Add Docker deployment instructions and build script
- Add build-and-push-docker.ps1 PowerShell script for automated Docker builds - Update README.md with comprehensive Docker deployment guide - Include environment variable configuration - Document automated email scheduling in containers - Add GitHub Container Registry push instructions
This commit is contained in:
1 parent
d9784738e4
commit
27d02596d1
3 files changed
+91
No files matched your search
@@ -0,0 +1,32 @@
|
||||
# Docker Build and Push Script for Prayer App
|
||||
# Run this script to build and push the Docker container to GitHub Container Registry
|
||||
|
||||
Write-Host "🔨 Building Docker image..." -ForegroundColor Green
|
||||
docker build -t ghcr.io/nmemmert/prayer-app:latest .
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "✅ Docker image built successfully!" -ForegroundColor Green
|
||||
|
||||
Write-Host "🔐 Logging into GitHub Container Registry..." -ForegroundColor Yellow
|
||||
Write-Host "Please enter your GitHub Personal Access Token (with package write permissions):" -ForegroundColor Yellow
|
||||
$token = Read-Host -AsSecureString
|
||||
$tokenPlain = [Runtime.InteropServices.Marshal]::PtrToStringAuto([Runtime.InteropServices.Marshal]::SecureStringToBSTR($token))
|
||||
|
||||
echo $tokenPlain | docker login ghcr.io -u nmemmert --password-stdin
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "🚀 Pushing Docker image to GitHub Container Registry..." -ForegroundColor Green
|
||||
docker push ghcr.io/nmemmert/prayer-app:latest
|
||||
|
||||
if ($LASTEXITCODE -eq 0) {
|
||||
Write-Host "✅ Docker image pushed successfully!" -ForegroundColor Green
|
||||
Write-Host "🌐 Your container is now available at: ghcr.io/nmemmert/prayer-app:latest" -ForegroundColor Cyan
|
||||
} else {
|
||||
Write-Host "❌ Failed to push Docker image" -ForegroundColor Red
|
||||
}
|
||||
} else {
|
||||
Write-Host "❌ Failed to login to GitHub Container Registry" -ForegroundColor Red
|
||||
}
|
||||
} else {
|
||||
Write-Host "❌ Failed to build Docker image" -ForegroundColor Red
|
||||
}
|
||||
Reference in new issue
Block a user