JasprServerDeployer class
Deploys the Jaspr server binary (SSR / hybrid render modes) to Google Cloud Run.
This is the Jaspr-side counterpart to
ServerSetup.deployToCloudRun for the arcane_server template.
Both services can run side-by-side in the same project — they push
to different Cloud Run service names (the arcane_server uses
<appName>-server; the Jaspr binary uses
SetupConfig.effectiveJasprServerServiceName, which defaults to
<appName>-web).
End-to-end flow:
- Preflight (CloudRunPreflight):
- Verify the active gcloud account belongs to the target project.
- Enable Artifact Registry + Cloud Run APIs (idempotent).
- Ensure the
oracularArtifact Registry repo exists.
- Build the Jaspr server image via
BuildOrchestrator.buildJasprServerImage (
docker build -f Dockerfile.jaspr -t IMAGE:latest [-t IMAGE:SHA] .). - Push the
:latesttag to Artifact Registry. The optional:SHAtag is pushed too, so the AR cleanup policy can keep traceable per-revision images. - Deploy to Cloud Run (
gcloud run deploy) using the same Cloud Run knobs as arcane_server (port 8080, 512Mi memory, 0..10 instances,--allow-unauthenticated).
Skipped when SetupConfig.hasJasprServer is false (i.e. the project is using a static render mode like CSR / SSG / embed).
Constructors
- JasprServerDeployer(SetupConfig config, {ProcessRunner? runner, BuildOrchestrator? builder, CloudRunPreflight? preflight})
Properties
- config → SetupConfig
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serviceName → String
-
Cloud Run service name for the Jaspr server. Defaults to
<appName>-webso it never collides with arcane_server's<appName>-server.no setter
Methods
-
deploy(
{String repository = 'oracular', String region = 'us-central1'}) → Future< JasprServerDeployResult> - End-to-end: build, push, and deploy the Jaspr server to Cloud Run.
-
imageTag(
{required String projectId, required String region, required String repository}) → String -
Fully-qualified
:latestimage tag for the Jaspr server. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited