Deploy to Fabric
Enable Fabric apps, sign in, deploy a Rayfin project with rayfin up, and confirm the static hosting URL.
Deploying publishes your Rayfin project as a managed Fabric app. Fabric hosts the AppBackend, data service, auth, Functions when enabled, and static frontend assets.
Prerequisites
- A Rayfin project with
rayfin/rayfin.yml. - A Microsoft account with access to a Fabric workspace.
- Fabric apps enabled in the tenant.
- A workspace with usable Fabric capacity, or permission to let the CLI prepare one.
npx rayfin logincompleted, unless the deploy command will start interactive sign-in.
Enable Fabric apps in your tenant
A Fabric tenant administrator must enable the workload before users can create App (preview) items.
- Open the Fabric admin portal.
- Go to Tenant settings.
- Under Fabric Apps (preview), switch the setting to Enabled.
- Choose whether to enable it for the whole organization or specific security groups.
- Click Apply.
- Wait a few minutes for the setting to propagate.
If you are not a tenant administrator, send this section to the person who manages Fabric tenant settings.
Create or let Rayfin create the App (preview) item
You can create the Fabric item first, or let the CLI create it during the first deploy.
Create it in the Fabric portal
- Open Microsoft Fabric and sign in.
- Select a workspace, or create one from Workspaces → New workspace.
- Assign Fabric capacity to the workspace if it does not already have one.
- In the workspace, select New item.
- Search for App (preview).
- Enter an item name and click Create.
- Open the item in VS Code or deploy a local Rayfin project to the same workspace.
Create it from the CLI
Run rayfin up from an existing Rayfin project. The first deploy creates an App (preview) item in the target workspace and records it in rayfin/.deployments.json.
npx rayfin up --workspace-id <workspace-guid>Sign in
npx rayfin login
npx rayfin login statusUse service principal auth for CI:
npx rayfin login --service-principal --client-id <app-registration-client-id> --client-secret <secret> --tenant <tenant-id>Deploy
npx rayfin upOn the first deploy, rayfin up resolves the workspace, checks capacity readiness, creates or reuses a Fabric item, syncs runtime settings, applies the data schema, builds and uploads static content, deploys Functions when enabled, and writes rayfin/.deployments.json plus rayfin/.env.
Override the Fabric item display name without changing rayfin.yml:
npx rayfin up --item-name my-team-app--item-name is new in Rayfin 1.36. New in 1.36
Prepare workspace capacity
Rayfin 1.36 can prepare a workspace and assign capacity during first deploys. New in 1.36
- If the workspace already has usable capacity, Rayfin uses it.
- In an interactive first deploy without a target, Rayfin asks whether to use a new workspace or select an existing workspace.
- With
--capacity-id <id>, Rayfin uses that capacity for the new target when capacity assignment is needed. - With
--yes, deterministic capacity assignment prompts are approved automatically. - In non-interactive deploys, pass explicit workspace targeting, and pass
--capacity-idwhen capacity selection would otherwise require a prompt.
Do not combine --capacity-id with --workspace, --workspace-id, --workspace-uri, or RAYFIN_WORKSPACE_ID.
Preview a deploy
npx rayfin up --dry-run --workspace-id <workspace-guid>In Rayfin 1.36, dry run validates local inputs and resolves the workspace without creating or modifying resources. Changed in 1.36
Skip static or Functions deployment
rayfin dev is the normal development loop. Use --exclude-services for automation that intentionally runs deployment while skipping selected build/package/deploy phases:
npx rayfin up --exclude-services staticHosting
npx rayfin up --exclude-services functionsSkipping functions is supported in Rayfin 1.36. New in 1.36
Verify the deployment
npx rayfin up status
npx rayfin up status --jsonStatus verifies management access to the Fabric item. When static content has been deployed, JSON includes deployment.hostingUrl.
Manage recorded deployments
npx rayfin up list
npx rayfin up switch staging
npx rayfin up switch --workspace-id <workspace-guid>up switch rewrites rayfin/.env for the active deployment and can regenerate .env.local unless --no-emit-env is set.
Sign out
npx rayfin logoutDeploy my Rayfin project to Microsoft Fabric. Run `npx rayfin login` if needed, then `npx rayfin up`. If this is the first deploy and no workspace is recorded, choose an appropriate Fabric workspace or use `--capacity-id` if I provided one. After deployment, run `npx rayfin up status --json` and report `deployment.hostingUrl`, the workspace ID, and the Fabric item ID. Do not use `rayfin up --exclude-services staticHosting` as the normal development loop; use `npm run dev` for local iteration.Next
- Deploying with rayfin up — flags and metadata in depth.
- Static hosting — asset access and limits.
- Deployment troubleshooting — exact error strings and fixes.
Project structure
Understand the Rayfin scaffold layout, including rayfin.yml, deployment metadata, environment files, and the 1.36 universal app workspace.
Data
Model entities once as decorated TypeScript classes and get a database schema, GraphQL API, type-safe client, permissions, and validation from the same source.