From aa4c95a3f4ea62e5a3eeaba8b9bb09d1938a02b8 Mon Sep 17 00:00:00 2001 From: martin legrand Date: Wed, 11 Jun 2025 20:50:41 +0200 Subject: [PATCH] fix : #305 safer container management --- start_services.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/start_services.sh b/start_services.sh index 79451ec..f16040e 100755 --- a/start_services.sh +++ b/start_services.sh @@ -83,11 +83,12 @@ if [ ! -f "docker-compose.yml" ]; then exit 1 fi -# Stop all running containers to ensure a clean state -echo "Warning: stopping all docker containers (t-4 seconds)..." -sleep 4 -docker stop $(docker ps -a -q) -echo "All containers stopped" +# Stop only the backend container if it's running to ensure a clean state +if docker ps --format '{{.Names}}' | grep -q '^backend$'; then + echo "New start: (re)starting backend container..." + docker stop backend + echo "Backend container stopped." +fi # export searxng secret key (cross-platform) if command -v openssl &> /dev/null; then