From 59ff15b809fcb9f75da82113829b42d6243ba02a Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 17 Apr 2026 00:29:51 +0300 Subject: [PATCH] Full cleanup and fresh container start --- sync-to-server.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sync-to-server.sh b/sync-to-server.sh index ca66271..27b26c7 100755 --- a/sync-to-server.sh +++ b/sync-to-server.sh @@ -57,7 +57,10 @@ ssh $SERVER_USER@$SERVER_IP << EOF fi if [ -f "docker-compose.yml" ]; then - echo "๐Ÿ—๏ธ Rebuilding production containers using \$DOCKER_CMD..." + echo "๐Ÿงน Cleaning up old containers and orphans..." + \$DOCKER_CMD down --remove-orphans || true + + echo "๐Ÿ—๏ธ Rebuilding and starting production containers using \$DOCKER_CMD..." \$DOCKER_CMD up -d --build else echo "โŒ Error: docker-compose.yml not found!"