Astro
Source:
src/Railway/Website/Astro.ts
Deploy an Astro application to Railway: the Node
SSR bundle (assets first, then the Astro fetch handler) on one
Railway.Service. Pages render on demand by default
(output: "server"); pages that export const prerender = true are
prerendered at build time and served as static files. With
astro: { output: "static" } every page is prerendered and the deploy
is assets-only.
The build runs through @alchemy.run/frontend-frameworks/astro with the
@alchemy.run/frontend-frameworks/astro/node deploy target (a Node
adapter is injected — your astro.config.* must not declare one).
During alchemy dev the site is Astro’s own dev server and no cloud
resources are created. Alchemy.remote() opts back into the live
Service path.
Creating Astro Sites
Section titled “Creating Astro Sites”const site = yield* Railway.Website.Astro("Web", { rootDir: "./app",});Static Sites
Section titled “Static Sites”const site = yield* Railway.Website.Astro("Docs", { rootDir: "./docs", astro: { output: "static" }, errorPage: "404.html",});Server Configuration
Section titled “Server Configuration”const site = yield* Railway.Website.Astro("Web", { rootDir: "./app", env: { API_BASE: "https://api.example.com", },});