1import { frameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts";
2
3/** The framework-integration package that drives the Octane build. */
4export const OCTANE_FRAMEWORK_SPECIFIER =
5 "@alchemy.run/frontend-frameworks/octane";
6
7/** The Node container deploy target for the Octane build. */
8export const OCTANE_NODE_TARGET_SPECIFIER =
9 "@alchemy.run/frontend-frameworks/octane/node";
10
11export interface OctaneProps extends FrameworkSiteProps {}
12
13/**
14 * Deploy an [OctaneJS](https://octanejs.dev) application to Fly: Octane's
15 * SSR server on a Machine, static assets baked into the image.
16 *
17 * `Fly.Website.Octane` selects hosting and automatically wraps Octane's
18 * default native Node output. Keep compiler and route settings in
19 * `octane.config.ts` without an adapter. The legacy Node marker adapter
20 * remains optional for existing projects.
21 *
22 * ### Creating Octane Sites
23 * **Example:** Basic Octane App
24 * ```typescript
25 * const site = yield* Fly.Website.Octane("Web", {
26 * rootDir: "./app",
27 * });
28 * ```
29 *
30 * **Example:** Custom Domain
31 * ```typescript
32 * const site = yield* Fly.Website.Octane("Web", {
33 * rootDir: "./app",
34 * domain: "app.example.com",
35 * });
36 * ```
37 *
38 * @resource
39 * @product Website
40 */
41export const Octane = (id: string, props: OctaneProps = {}) =>
42 frameworkSite(id, props, {
43 name: "Octane",
44 framework: OCTANE_FRAMEWORK_SPECIFIER,
45 target: OCTANE_NODE_TARGET_SPECIFIER,
46 });