deployment script
This commit is contained in:
parent
11cf414489
commit
996caf342f
1 changed files with 23 additions and 0 deletions
23
deploy_zero_downtime.sh
Executable file
23
deploy_zero_downtime.sh
Executable file
|
|
@ -0,0 +1,23 @@
|
|||
#!/bin/bash
|
||||
# deploy-zero-downtime.sh
|
||||
|
||||
echo "🔄 Pulling latest code..."
|
||||
git pull
|
||||
|
||||
echo "🏗️ Building new images..."
|
||||
docker compose build
|
||||
|
||||
echo "🔄 Rolling update..."
|
||||
docker compose up -d --no-deps --remove-orphans --build frontend
|
||||
# Wait for health check
|
||||
sleep 5
|
||||
|
||||
docker compose up -d --no-deps --build backend
|
||||
# Wait for health check
|
||||
sleep 5
|
||||
|
||||
echo "🧹 Cleaning up old images..."
|
||||
docker image prune -f
|
||||
|
||||
echo "✅ Deployment complete!"
|
||||
docker compose ps
|
||||
Loading…
Add table
Add a link
Reference in a new issue