The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 1 | import * as Namespace from "alchemy/Namespace"; |
| 2 | import { makeFrameworkSite, type FrameworkSiteProps } from "./FrameworkSite.ts"; |
| 3 | |
| 4 | /** The framework-integration package that drives the Octane build. */ |
| 5 | export const OCTANE_FRAMEWORK_SPECIFIER = "@alchemy.run/frontend-frameworks/octane"; |
| 6 | |
| 7 | /** The Node container deploy target for the Octane build. */ |
| 8 | export const OCTANE_NODE_TARGET_SPECIFIER = "@alchemy.run/frontend-frameworks/octane/node"; |
| 9 | |
| 10 | export interface OctaneProps extends FrameworkSiteProps {} |
| 11 | |
| 12 | /** |
| 13 | * Deploy an [OctaneJS](https://octanejs.dev) application to a Hetzner |
| 14 | * Cloud Server: Octane's SSR server as a systemd unit on port 3000, |
| 15 | * static assets baked into the unit. |
| 16 | * |
| 17 | * `Hetzner.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* Hetzner.Website.Octane("Web", { |
| 26 | * rootDir: "./app", |
| 27 | * }); |
| 28 | * ``` |
| 29 | * |
| 30 | * **Example:** Custom Domain |
| 31 | * ```typescript |
| 32 | * const site = yield* Hetzner.Website.Octane("Web", { |
| 33 | * rootDir: "./app", |
| 34 | * domain: "app.example.com", |
| 35 | * zone, |
| 36 | * }); |
| 37 | * ``` |
| 38 | * |
| 39 | * @resource |
| 40 | * @product Website |
| 41 | */ |
| 42 | export const Octane = (id: string, props: OctaneProps = {}) => |
| 43 | makeFrameworkSite(id, props, { |
| 44 | name: "Octane", |
| 45 | framework: OCTANE_FRAMEWORK_SPECIFIER, |
| 46 | target: OCTANE_NODE_TARGET_SPECIFIER, |
| 47 | }).pipe(Namespace.push(id)); |