-
Notifications
You must be signed in to change notification settings - Fork 100
feat(doc): add ship #866
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat(doc): add ship #866
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,135 @@ | ||
| --- | ||
| title: "Ship" | ||
| description: "Deploy your app to a stable, public URL" | ||
| icon: "cloud-upload" | ||
| --- | ||
| <img src="/images/deploy.png" alt="Deploy Illustration" style={{ width: "100%", maxHeight: "40vh", marginTop:"-0.75rem", objectFit: "cover", borderRadius: "15px" }} /> | ||
|
|
||
| A deployed MCP App is a server on a public URL: hosts connect to `https://your-domain.com/mcp` and the built views are served from the same origin. | ||
|
|
||
| Two commands take it there: | ||
|
|
||
| - `skybridge build` compiles the views and the server into `dist/` | ||
| - `skybridge start` runs the result with `NODE_ENV=production`: pre-built assets on `/assets`, the MCP server on `/mcp`, dev tooling excluded | ||
|
|
||
| Run them on any Node.js-compatible infrastructure, or pick a platform that automates them: | ||
|
|
||
| ## Alpic | ||
|
|
||
| [Alpic](https://alpic.ai) is the preferred deployment target: a cloud platform built for MCP Apps, by the company behind Skybridge. Deployed apps get MCP analytics, logs, insights, and a public playground. | ||
|
|
||
| Deploying is free, and one command away from any Skybridge project: | ||
|
|
||
| <CodeGroup> | ||
| ```bash npm | ||
| npm run deploy | ||
| ``` | ||
| ```bash pnpm | ||
| pnpm run deploy | ||
| ``` | ||
| ```bash yarn | ||
| yarn deploy | ||
| ``` | ||
| ```bash bun | ||
| bun run deploy | ||
| ``` | ||
| ```bash deno | ||
| deno task deploy | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| For continuous deployment, push your app to GitHub and connect the repository from [app.alpic.ai](https://app.alpic.ai): every commit then ships automatically. | ||
|
|
||
| <Info> | ||
| Alpic also ships its own [MCP App](https://docs.alpic.ai/features/mcp-server) to manage your deployments from any MCP client: connect to `https://mcp.alpic.ai/mcp`. | ||
| </Info> | ||
|
|
||
| ## Cloudflare Workers | ||
|
|
||
| Skybridge runs on Cloudflare Workers via [Wrangler](https://developers.cloudflare.com/workers/wrangler/install-and-update/) and the `nodejs_compat` runtime. Static assets (your built views) are served by Cloudflare's edge directly; the worker handles `/mcp` traffic and any other dynamic routes. | ||
|
|
||
| Add a `wrangler.jsonc` at your project root: | ||
|
|
||
| ```jsonc wrangler.jsonc | ||
| { | ||
| "name": "your-skybridge-app", | ||
| "main": "dist/__entry.js", | ||
| "compatibility_date": "2025-09-01", | ||
| "compatibility_flags": ["nodejs_compat"], | ||
| "assets": { "directory": "dist/assets" }, | ||
| "define": { | ||
| "process.env.NODE_ENV": "\"production\"" | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Each setting is load-bearing: | ||
|
|
||
| - `compatibility_date >= 2025-09-01` and `nodejs_compat`: enable `cloudflare:node`'s `httpServerHandler`, which Skybridge uses to bridge the Express app to the Workers fetch event. | ||
| - `assets.directory`: points at the views built by `skybridge build`. Cloudflare serves these at the edge before requests reach your worker. | ||
| - `define.process.env.NODE_ENV`: forces production mode even under `wrangler dev`. Without it, wrangler defaults to `development` locally and Skybridge's dev tooling (Vite, the DevTools server) gets pulled into the worker bundle, where neither runs. | ||
|
|
||
| Then build and deploy: | ||
|
|
||
| <CodeGroup> | ||
| ```bash npm | ||
| npm run build | ||
| npx wrangler deploy | ||
| ``` | ||
| ```bash pnpm | ||
| pnpm build | ||
| pnpm dlx wrangler deploy | ||
| ``` | ||
| ```bash yarn | ||
| yarn build | ||
| yarn dlx wrangler deploy | ||
| ``` | ||
| ```bash bun | ||
| bun run build | ||
| bunx wrangler deploy | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| <Info> | ||
| `wrangler dev` runs your worker in workerd on your machine, the same runtime as production, not a Node.js fallback. Use `skybridge dev` for fast iteration with HMR; use `wrangler dev` to validate the production worker bundle before shipping. | ||
| </Info> | ||
|
|
||
| ## Docker | ||
|
|
||
| Projects created with `npx skybridge create` include a multi-stage `Dockerfile`, so you can self-host on any container platform: | ||
|
|
||
| ```bash | ||
| docker build -t my-app . | ||
| docker run -p 3000:3000 my-app | ||
| ``` | ||
|
|
||
| <Info> | ||
| The package manager is detected from the lockfile (`package-lock.json`, `yarn.lock`, or `pnpm-lock.yaml`). Bun and Deno are not supported yet: adapt the build stage inside the Dockerfile. | ||
| </Info> | ||
|
|
||
| ## Vercel | ||
|
|
||
| `skybridge build` emits a [Build Output API](https://vercel.com/docs/build-output-api) tree under `.vercel/output/`: a bundled serverless function, the static asset tree, and the routing config. No `vercel.json` required. | ||
|
|
||
| <CodeGroup> | ||
| ```bash npm | ||
| npm run build | ||
| npx vercel deploy --prebuilt | ||
| ``` | ||
| ```bash pnpm | ||
| pnpm build | ||
| pnpm dlx vercel deploy --prebuilt | ||
| ``` | ||
| ```bash yarn | ||
| yarn build | ||
| yarn dlx vercel deploy --prebuilt | ||
| ``` | ||
| ```bash bun | ||
| bun run build | ||
| bunx vercel deploy --prebuilt | ||
| ``` | ||
| </CodeGroup> | ||
|
|
||
| <Info> | ||
| `.vercel/` is gitignored by Vercel CLI convention, so the build artifacts stay out of your tracked working tree. | ||
| </Info> | ||
|
paulleseute marked this conversation as resolved.
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.