DigitalOcean.Website reference
Source:
packages/digitalocean/src/Website/Astro.ts
Deploy an Astro application to DigitalOcean
App Platform: the Node adapter bundle as a App Platform service, static
assets baked into the unit. Pages render on demand by default
(output: "server"); output: "static" in your astro.config.* or
astro: { output: "static" } prerenders every page and deploys
assets-only.
The build runs through @alchemy.run/frontend-frameworks/astro with the
@alchemy.run/frontend-frameworks/astro/node deploy target. Your
astro.config.* must not declare an adapter.
Astro: Creating Astro Sites
Section titled “Astro: Creating Astro Sites”const site = yield* DigitalOcean.Website.Astro("Web", { rootDir: "./app",});Astro: Static Sites
Section titled “Astro: Static Sites”const site = yield* DigitalOcean.Website.Astro("Docs", { rootDir: "./docs", astro: { output: "static" }, assets: { notFoundHandling: "404-page" },});Foldkit
Section titled “Foldkit”Source:
packages/digitalocean/src/Website/Foldkit.ts
Deploy a Foldkit application to DigitalOcean Cloud.
Browser-only apps use SPA routing. With ssr.build enabled in the
Foldkit Vite plugin, prerendered pages and assets are served first,
followed by Foldkit’s generated request handler for SSR and hybrid routes.
The build uses @alchemy.run/frontend-frameworks/foldkit and the
project’s Vite configuration. No application adapter is required.
Native Foldkit development and live reload run without cloud resources;
Alchemy.remote() opts into a live deployment during development.
Foldkit: Creating a Website
Section titled “Foldkit: Creating a Website”const site = yield* DigitalOcean.Website.Foldkit("Web", { rootDir: "./app",});Foldkit: Server Configuration
Section titled “Foldkit: Server Configuration”const site = yield* DigitalOcean.Website.Foldkit("Web", { rootDir: "./app", env: { API_BASE: "https://api.example.com" },});Nextjs
Section titled “Nextjs”Source:
packages/digitalocean/src/Website/Nextjs.ts
Deploy a Next.js application to a DigitalOcean App Platform: next build
then a long-running next({ dev: false }) App Platform service.
Does not use OpenNext (those wrappers are Lambda/workerd).
The .next output (and public/ when present) is packed into the
unit archive. next, react, and react-dom are installed on the
unit with npm install rather than bundled.
During alchemy dev the site is next dev and no cloud resources
are declared; Alchemy.remote() opts back into the live Service.
Nextjs: Creating Next.js Sites
Section titled “Nextjs: Creating Next.js Sites”const site = yield* DigitalOcean.Website.Nextjs("Web", { rootDir: "./app",});Source:
packages/digitalocean/src/Website/Nuxt.ts
Deploy a Nuxt application to a DigitalOcean App Platform: the nitro Node server as a App Platform service, static assets baked into the unit.
The build runs through @alchemy.run/frontend-frameworks/nuxt with the
@alchemy.run/frontend-frameworks/nuxt/node deploy target (nitro.preset
"node").
Nuxt: Creating Nuxt Sites
Section titled “Nuxt: Creating Nuxt Sites”const site = yield* DigitalOcean.Website.Nuxt("Web", { rootDir: "./app",});Octane
Section titled “Octane”Source:
packages/digitalocean/src/Website/Octane.ts
Deploy an OctaneJS application to a DigitalOcean Cloud Server: Octane’s SSR server as a App Platform service, static assets baked into the unit.
DigitalOcean.Website.Octane selects hosting and automatically wraps Octane’s
default native Node output. Keep compiler and route settings in
octane.config.ts without an adapter. The legacy Node marker adapter
remains optional for existing projects.
Octane: Creating Octane Sites
Section titled “Octane: Creating Octane Sites”const site = yield* DigitalOcean.Website.Octane("Web", { rootDir: "./app",});ReactRouter
Section titled “ReactRouter”Source:
packages/digitalocean/src/Website/ReactRouter.ts
Deploy a React Router v7 app (framework mode) to a DigitalOcean App Platform: the SSR server as a App Platform service, static assets baked into the unit.
The build runs through
@alchemy.run/frontend-frameworks/react-router with the
@alchemy.run/frontend-frameworks/react-router/node deploy target — both
must be installed in your project, alongside @react-router/dev,
react-router, and vite.
Your vite.config.ts needs no adapter wiring. React Router’s server
build is a ServerBuild manifest rather than a request handler, so the
integration makes the server pass’s build input a module that wraps the
manifest with createRequestHandler and packages the resulting fetch
handler as a Node HTTP server.
React Server Components (React Router’s unstable RSC plugin) and
multi-environment builds are not supported yet — the build fails with an
actionable error when more than one server entry is emitted.
ReactRouter: Creating React Router Sites
Section titled “ReactRouter: Creating React Router Sites”const site = yield* DigitalOcean.Website.ReactRouter("Web", { rootDir: "./app",});ReactRouter: Server Configuration
Section titled “ReactRouter: Server Configuration”Process Environment
const site = yield* DigitalOcean.Website.ReactRouter("Web", { rootDir: "./app", env: { API_BASE: "https://api.example.com", },});Read An Environment Variable From A Loader
export function loader() { return { apiBase: process.env.API_BASE ?? "unset" };}SolidStart
Section titled “SolidStart”Source:
packages/digitalocean/src/Website/SolidStart.ts
Deploy a SolidStart application to a DigitalOcean App Platform: the SSR server as a App Platform service, static assets (prerendered pages included) baked into the unit.
The build runs through @alchemy.run/frontend-frameworks/solidstart with
the @alchemy.run/frontend-frameworks/solidstart/node deploy target —
both must be installed in your project, alongside @solidjs/start and
@solidjs/vite-plugin-nitro-2.
Your vite.config.ts needs no adapter wiring: the integration drives the
project’s own vite build and appends its own nitro plugin instance
carrying nitro’s node preset.
SolidStart: Creating SolidStart Sites
Section titled “SolidStart: Creating SolidStart Sites”const site = yield* DigitalOcean.Website.SolidStart("Web", { rootDir: "./app",});SolidStart: Server Configuration
Section titled “SolidStart: Server Configuration”const site = yield* DigitalOcean.Website.SolidStart("Web", { rootDir: "./app", env: { API_BASE: "https://api.example.com", },});SolidStart: Prerendering
Section titled “SolidStart: Prerendering”The integration owns the nitro plugin instance (a nitroV2Plugin() in
your vite.config.* is rejected), so nitro options — prerendering
included — go on the nitro prop. Prerendered pages are baked into the
unit and served as static assets.
const site = yield* DigitalOcean.Website.SolidStart("Web", { rootDir: "./app", nitro: { prerender: { routes: ["/", "/about"] } },});StaticSite
Section titled “StaticSite”Source:
packages/digitalocean/src/Website/StaticSite.ts
A DigitalOcean App that serves static files built by a shell command
(Hugo, Jekyll, Eleventy, a hand-written dist/). The output is baked
into the App’s image with a small static-file server. It runs as an App
service because Spaces has no index documents or single-page fallback,
and App Platform’s static sites build only from a git repository.
For Vite-based projects, prefer DigitalOcean.Website.Vite.
StaticSite: Creating Static Sites
Section titled “StaticSite: Creating Static Sites”A Hugo blog
const site = yield* DigitalOcean.Website.StaticSite("Blog", { command: "hugo --minify", outdir: "public",});A single-page app
const site = yield* DigitalOcean.Website.StaticSite("App", { command: "npm run build", outdir: "dist", spa: true,});SvelteKit
Section titled “SvelteKit”Source:
packages/digitalocean/src/Website/SvelteKit.ts
Deploy a SvelteKit application to a DigitalOcean App Platform: kit’s SSR server as a App Platform service, static assets (prerendered pages included) baked into the unit.
The build runs through @alchemy.run/frontend-frameworks/sveltekit with
the @alchemy.run/frontend-frameworks/sveltekit/node deploy target.
SvelteKit: Creating SvelteKit Sites
Section titled “SvelteKit: Creating SvelteKit Sites”const site = yield* DigitalOcean.Website.SvelteKit("Web", { rootDir: "./app",});TanStackStart
Section titled “TanStackStart”Source:
packages/digitalocean/src/Website/TanStackStart.ts
Deploy a TanStack Start application to a DigitalOcean App Platform: the SSR server as a App Platform service, static assets baked into the unit.
The build runs through
@alchemy.run/frontend-frameworks/tanstack-start with the
@alchemy.run/frontend-frameworks/tanstack-start/node deploy target —
both must be installed in your project, alongside @tanstack/react-start
(or @tanstack/solid-start) and vite.
Your vite.config.ts needs no adapter wiring: TanStack Start is pure
Vite, so the integration drives the project’s own vite build, forces
the SSR bundle to be self-contained, and wraps its fetch handler as a
Node HTTP server.
TanStackStart: Creating TanStack Start Sites
Section titled “TanStackStart: Creating TanStack Start Sites”const site = yield* DigitalOcean.Website.TanStackStart("Web", { rootDir: "./app",});TanStackStart: Server Configuration
Section titled “TanStackStart: Server Configuration”Process Environment
const site = yield* DigitalOcean.Website.TanStackStart("Web", { rootDir: "./app", env: { API_BASE: "https://api.example.com", },});Read An Environment Variable From A Server Function
const getApiBase = createServerFn({ method: "GET" }).handler(() => ({ apiBase: process.env.API_BASE,}));Vinext
Section titled “Vinext”Source:
packages/digitalocean/src/Website/Vinext.ts
Deploy a vinext application to DigitalOcean
App Platform: vinext’s Vite build then a long-running startProdServer App Platform
service. Does not use the Cloudflare Worker entry
(vinext/server/fetch-handler).
The dist/ output is packed into the unit archive. vinext,
react, react-dom, and react-server-dom-webpack are installed on
the unit with npm install rather than bundled.
During alchemy dev the site is vinext dev and no cloud resources
are declared; Alchemy.remote() opts back into the live Service.
Vinext: Creating vinext Sites
Section titled “Vinext: Creating vinext Sites”Basic vinext App
const site = yield* DigitalOcean.Website.Vinext("Web", { rootDir: "./app",});Redis data cache
ISR / "use cache" default to in-process memory. Set env.REDIS_URL on
this resource for a durable Redis store; the adapter is injected automatically.
const site = yield* DigitalOcean.Website.Vinext("Web", { env: { REDIS_URL: "redis://cache.internal:6379", },});Source:
packages/digitalocean/src/Website/Vite.ts
Deploy a plain Vite application to DigitalOcean
App Platform: vite build output served by a static-file App Platform service. For client-only projects — React/Vue/Solid SPAs,
index.html multi-page apps — whose entire deployable output is
static assets.
The build runs through @alchemy.run/frontend-frameworks/vite with the
@alchemy.run/frontend-frameworks/vite/node deploy target — the package
must be installed in your project. During alchemy dev the site is
Vite’s own dev server and no cloud resources are created.
Vite: Creating Vite Sites
Section titled “Vite: Creating Vite Sites”Basic Vite SPA
const site = yield* DigitalOcean.Website.Vite("Web");Project in a Subdirectory
const site = yield* DigitalOcean.Website.Vite("Web", { rootDir: "./app",});Vite: Multi-Page Sites
Section titled “Vite: Multi-Page Sites”const site = yield* DigitalOcean.Website.Vite("Docs", { assets: { notFoundHandling: "404-page" },});Vite: Custom Domain
Section titled “Vite: Custom Domain”Vite: Build Configuration
Section titled “Vite: Build Configuration”const site = yield* DigitalOcean.Website.Vite("Docs", { outDir: "build", base: "/docs/",});Vite: Local Development
Section titled “Vite: Local Development”// `alchemy dev` starts `vite` programmatically: site.url is the local// dev server (HMR included); no Server or Service is created.const site = yield* DigitalOcean.Website.Vite("Web");Source:
packages/digitalocean/src/Website/Vocs.ts
Deploy a Vocs documentation project to a DigitalOcean
Cloud Server. Static assets first, then Vocs’ Waku RSC handler
(/about → about/index.html, otherwise SSR).
Vocs: Creating Vocs Sites
Section titled “Vocs: Creating Vocs Sites”Vocs Documentation Site
const docs = yield* DigitalOcean.Website.Vocs("Docs", { rootDir: "./docs",});Custom Output Directory
const docs = yield* DigitalOcean.Website.Vocs("Docs", { rootDir: "./docs", outDir: "build",});Source:
packages/digitalocean/src/Website/Waku.ts
Deploy a Waku application to a DigitalOcean App Platform:
the RSC server as a App Platform service, static assets (SSG
pages included) baked into the unit. Prerendered pages are served
extensionless (/about not /about/).
Waku: Creating Waku Sites
Section titled “Waku: Creating Waku Sites”const site = yield* DigitalOcean.Website.Waku("Web", { rootDir: "./app",});