Fly Machines
The Fly Machines lexicon defines Fly.io apps and machines using chant’s declarative TypeScript syntax. Resources are serialized to the JSON create bodies the Machines API (“flaps”) accepts, so the applier can POST them straight through and the mudflaps emulator can round-trip them offline.
This lexicon is generated from Fly’s published Machines API OpenAPI spec.
Install it with:
npm install --save-dev @intentius/chant-lexicon-flyQuick Start
Section titled “Quick Start”import { App, Machine, MachineConfig, MachineGuest, Fly } from "@intentius/chant-lexicon-fly";
const app = new App({ name: "my-app", org_slug: Fly.OrgSlug });
const web = new Machine({ name: "web", region: Fly.Region, config: new MachineConfig({ image: "flyio/hellofly:latest", guest: new MachineGuest({ cpu_kind: "shared", cpus: 1, memory_mb: 256 }), }),});
export { app, web };Fly.Region and Fly.OrgSlug are pseudo-parameters resolved from the environment at build time (FLY_REGION, FLY_ORG / FLY_ORG_SLUG).
At a Glance
Section titled “At a Glance”| Metric | Count |
|---|---|
| Resources | 6 |
| Property types | 35 |
| Services | 5 |
| Intrinsic functions | 0 |
| Pseudo-parameters | 0 |
| Lint rules | 5 |
Lexicon version: 0.0.1
Namespace: fly
- Resource Reference
- Pseudo-parameters
- Lint Rules — 5 rules
- Serialization — output format details