Vector Image Detection
GitHub リポジトリ

検索したい単語を入力

いつでも検索バーを開ける

Cloudflare コマンド

local/remote を取り違えないための build、migration、dry-run、preflight

目的実行するコマンドremote への作用
local D1 migrationpnpm --filter @vector-image-detection/demo run db:migrate:localなし
docs 構文/リンクpnpm --filter @vector-image-detection/docs run checkなし
docs buildpnpm --filter @vector-image-detection/docs run buildなし
local credited seed importpnpm run demo:seed:localなし(local D1/R2 test resources)
placeholder deploy dry-runpnpm --filter @vector-image-detection/demo run deploy:dry-run:productionなし
production config の renderpnpm --filter @vector-image-detection/demo run render:productionなし(生成 file のみ)
remote D1 migrationrender の直後に pnpm --filter @vector-image-detection/demo exec wrangler d1 migrations apply DB --remote --config .wrangler.production.generated.json指定 D1 のみ
authenticated release gatepnpm run cloudflare:demo-preflightreadiness GET のみ
rendered demo deploymentGitHub Actions の deploy-demo job のみ指定 production Worker

rendered demo deployment に手元用の script はありません。実 deploy は deploy-demo job が wrangler deploy --config .wrangler.production.generated.json --secrets-file <RUNNER_TEMP の file> として実行します。secrets file なしで deploy すると access gate secret を持たない Worker になり、production では serve を拒否するため、この経路は CI に限定しています。

remote D1 migration は必ず render 後の .wrangler.production.generated.json に対して実行します。committed の wrangler.production.jsonc を直接 --config に渡してはいけません — placeholder の database_id(00000000-0000-0000-0000-000000000000)が非空なので、wrangler の D1 lookup(getDatabaseByNameOrBinding/hasUuid)は account への名前解決を一切せずこの placeholder UUID をそのまま使い、--remote を付けても実 account の DB には届かず失敗します。詳しい手順(render に必要な 10 個の env var を含む)は operator runbook を参照してください。

--remote を含む D1 command と明示した resource name は実 account に作用します。production name を shell history、issue、docs、source にハードコードしません。wrangler vectorize create <name> --dimensions=768 --metric=cosine の metric/dimension は作成後に変更できないため、モデルの 768-dimensional embedding と一致することを先に確認してください。

cloudflare:demo-preflight は DEMO_PREFLIGHT_URL、DEMO_PREFLIGHT_TOKEN、3 acknowledgement variables を必要とします。ready response は configuration、D1、migrations、R2、Queue、DLQ、Workers AI、Vectorize、rate limit、operator acknowledgements をすべて pass と報告する必要があります。

pnpm run demo:seed:local は 100 credited thumbnails を deterministic local D1/R2/outbox import に通し、ready/attribution と unchanged rerun を確認します。node apps/demo/scripts/seed-manifest.mjs [--remote --target <environment>] は validation/report 専用で Cloudflare に書き込みません。--remote に --target がなければ失敗し、remote を暗黙選択しません。local seed command は remote target を明示的に拒否します。remote seed は provision 後の authenticated operator action として deferred です。

offline CLI の正確な options は pnpm vis <command> --help を正本とします。vis の command は hosted release workflow ではありません。