diff --git a/scripts/fast-deploy.sh b/scripts/fast-deploy.sh index 004dcf7..8060fab 100644 --- a/scripts/fast-deploy.sh +++ b/scripts/fast-deploy.sh @@ -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 -- (e.g. crm_app--). +# 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-- 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"