File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -91,14 +91,21 @@ jobs:
9191 ls -t /tmp/backup-*.tar.gz 2>/dev/null | tail -n +6 | xargs -r rm
9292 fi
9393
94+ # Stop and remove old containers
95+ echo "🛑 Stopping old containers..."
96+ docker compose down --remove-orphans || true
97+
98+ # Clean up old files (keep data volumes)
99+ echo "🧹 Cleaning up old files..."
100+ rm -f docker-compose.yml Dockerfile Dockerfile.* 2>/dev/null || true
101+
94102 # Extract new deployment
95103 echo "📂 Extracting new files..."
96104 tar -xzf /tmp/deploy-vps.tar.gz
97105 rm /tmp/deploy-vps.tar.gz
98106
99107 # Rebuild and restart containers
100108 echo "🐳 Rebuilding Docker containers..."
101- docker compose down --remove-orphans || true
102109 docker compose up --build -d
103110
104111 # Wait for services to be healthy
You can’t perform that action at this time.
0 commit comments