fix(deploy): fast-deploy.sh container search for crm_app naming

Commit 48e6b15 renamed services to crm_app/crm_worker, but fast-deploy.sh
still searched for containers with UUID prefix only. Now falls back to
matching UUID + 'app' in container name.
This commit is contained in:
Agent Zero
2026-08-07 22:17:06 +02:00
parent fdabd2e74c
commit d08e09a3bb
+7 -1
View File
@@ -102,9 +102,15 @@ cd "$REPO_ROOT/frontend"
npm run build 2>&1 | tail -3
echo "[2/5] Finding container..."
# Coolify containers are named like <service>-<uuid>-<timestamp> (e.g. crm_app-<uuid>-<ts>).
# Try legacy UUID-prefix first, then fall back to any running container that contains the UUID
# and has 'app' in its name (covers crm_app-<uuid>-<ts> naming convention).
CONTAINER=$(ssh $SSH_OPTS $SERVER "docker ps --format '{{.Names}}' | grep '^${APP_UUID}-' | head -1")
if [ -z "$CONTAINER" ]; then
echo "ERROR: Could not find app container with prefix ${APP_UUID}-" >&2
CONTAINER=$(ssh $SSH_OPTS $SERVER "docker ps --format '{{.Names}}' | grep '${APP_UUID}' | grep 'app' | head -1")
fi
if [ -z "$CONTAINER" ]; then
echo "ERROR: Could not find app container containing UUID ${APP_UUID}" >&2
exit 1
fi
echo " Container: $CONTAINER"