From 3130a358ab29e5a56234252f7b24867e5c353362 Mon Sep 17 00:00:00 2001 From: admin Date: Fri, 19 Jun 2026 10:33:28 +0700 Subject: [PATCH] 690619:1033 240 #01 --- .gitea/workflows/ci-deploy.yml | 2 +- scripts/deploy.sh | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/ci-deploy.yml b/.gitea/workflows/ci-deploy.yml index b8966194..87a0c45a 100644 --- a/.gitea/workflows/ci-deploy.yml +++ b/.gitea/workflows/ci-deploy.yml @@ -100,4 +100,4 @@ jobs: ./scripts/deploy.sh REMOTE_EOF - timeout-minutes: 20 + timeout-minutes: 30 diff --git a/scripts/deploy.sh b/scripts/deploy.sh index 872680e5..b710329d 100644 --- a/scripts/deploy.sh +++ b/scripts/deploy.sh @@ -51,7 +51,15 @@ echo "✓ Images built" # [2/3] Start / restart stack with new images echo "[2/3] Starting application stack..." -docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" up -d --force-recreate + +# Check if clamav is already healthy to avoid 5-minute healthcheck delay +if docker ps --filter "name=clamav" --filter "status=running" --format "{{.Status}}" 2>/dev/null | grep -q "healthy"; then + echo " ClamAV already healthy, skipping recreation" + docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" up -d --force-recreate backend frontend +else + echo " ClamAV not healthy or not running, recreating full stack" + docker compose --env-file "$ENV_FILE" -f "$COMPOSE_FILE" up -d --force-recreate +fi echo "✓ Stack started" # [3/3] Health check