Skip to content

Commit 1898c6a

Browse files
committed
fix: stop existing container before deployment
1 parent c2657de commit 1898c6a

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,11 @@ jobs:
273273
echo "Pulling new image..."
274274
sudo docker compose -f compose.prod.yml pull
275275
276-
# Restart with new image
277-
echo "Restarting container..."
276+
# Stop and remove existing container, then start fresh
277+
echo "Stopping existing container..."
278+
sudo docker compose -f compose.prod.yml down --remove-orphans || true
279+
280+
echo "Starting new container..."
278281
sudo docker compose -f compose.prod.yml up -d
279282
280283
# Wait for container to be healthy

0 commit comments

Comments
 (0)