Skip to main content

Crate stackless_laravel_cloud

Crate stackless_laravel_cloud 

Source
Expand description

stackless-laravel-cloud (ARCHITECTURE.md §4): the Laravel Cloud substrate.

Stripe Projects provisions laravel_cloud/application and tracks spend; the Laravel Cloud JSON:API fills its gaps — resolve the environment, trigger a deploy, poll to deployment.succeeded, and the health wait. One long-lived Stripe project per stack holds each instance as a named environment.

§Credential model

Provisioning returns a Stripe-managed app_id. Deploy-time API calls use LARAVEL_CLOUD_API_TOKEN from the Stripe instance environment when present, otherwise the operator token (LARAVEL_CLOUD_API_TOKEN env / secrets / .laravel-cloud-token). Observe/destroy key off the Stripe resource registration, not the Laravel Cloud API.

§Deploy paths and cloud invariants

  • Git deploy: Laravel Cloud builds from the repository configured at provision time ([services.X.laravel-cloud].repository); start triggers POST /environments/{id}/deployments and polls until success.
  • Cloud resource names are {stack}-{instance}-{service} — DNS-safe.
  • Setup is skipped on cloud; prepare runs on the operator’s machine.
  • Source override is unsupported — Laravel Cloud deploys committed refs.

Modules§

api_key
Laravel Cloud API token resolution: Stripe instance env, then env var / resolved secrets, then a scoped key file.
codes
Stable error codes for the Laravel Cloud substrate (ARCHITECTURE.md §2/§8).
config
Parsing the laravel-cloud-specific blocks of the definition (§1 schema).
error
Laravel Cloud substrate errors (codes in this crate’s laravel_cloud.* registry).
laravel_api
Laravel Cloud REST client (JSON:API): environments, deployments, logs.

Structs§

LaravelCloudSubstrate
The Laravel Cloud substrate. Generic over the command runner so tests inject canned Stripe envelopes; production uses the real stripe binary.

Constants§

SPEND_CAP_USD
The hard per-provider spend cap set on first paid confirmation (§4).
SUBSTRATE_NAME