Skip to main content

Reference

Backend API / App Platform

Run the API on App Platform as a managed runtime with no host-level responsibility. This is the narrowest supported API baseline in the current catalog.

Overview

Variant overview

Run the API on App Platform as a managed runtime with no host-level responsibility. This is the narrowest supported API baseline in the current catalog.

Manifest file

Edit backend-api-app-platform.environment.yaml to change the scenario.

Rendered output

OPSd renders the manifest into OpenTofu under rendered/backend-api-app-platform.

Supported changes

The variant defines which add, remove, and scale operations are supported.

Good fit

App Platform is already the intended runtime; the team wants managed deployment and scaling; host-level access is not a core requirement

Tradeoff

Less host-level control than a VM-based rollout.

What gets created for this setup

This diagram shows the result you get after rendering the selected variant.

Infrastructure shape

Actor

Provider Zone

Edge

Compute

DNS
App Platform
Actor -> DNS · request 1 DNS -> App Platform · ingress 2

Before you start

Shared setup is covered in Installation and the Introduction. This section lists the minimum things you need before the first render for DigitalOcean.

  • Installation install the shared OPSd CLI.
  • Introduction understand the workflow boundary and required toolchain.
  • Have a container image or build artifact ready.

Initialize this variant

Start here when you want the smallest managed runtime footprint and do not need to operate hosts directly.

Initialization sequence

opsd list blueprints
opsd init blueprint backend-api backend-api-app-platform.environment.yaml --variant app-platform
opsd validate manifest backend-api-app-platform.environment.yaml
opsd render manifest backend-api-app-platform.environment.yaml --output rendered/backend-api-app-platform
cd rendered/backend-api-app-platform
tofu init
tofu plan

# review the rendered output before planning
cd rendered/backend-api-app-platform
tofu init
tofu plan

Edit the manifest

Most changes stay inside manifest edits: scale the service, add a managed database, or adjust delivery settings.

Supported change commands

Scale the primary compute group

Adjust the replica count on the existing group.

opsd scale compute-group backend-api-app-platform.environment.yaml primary --replicas 2

Add a managed database

Add a supported managed database entry.

opsd add database postgres backend-api-app-platform.environment.yaml --id primary-db

Add a support node

Add a bastion or helper node and remove it again if needed.

opsd add node vm backend-api-app-platform.environment.yaml --id bastion --role bastion --profile s-1vcpu-1gb

Remove a support node

Drop a helper node when the variant supports removal.

opsd remove node backend-api-app-platform.environment.yaml bastion

Edit, validate, render

# edit backend-api-app-platform.environment.yaml

# validate the config before rendering
opsd validate manifest backend-api-app-platform.environment.yaml

# render the updated output and review it
opsd render manifest backend-api-app-platform.environment.yaml --output rendered/backend-api-app-platform
cd rendered/backend-api-app-platform

# plan and apply only after the diff is clear
tofu plan
tofu apply

Supported changes

These examples come from the variant capability map and show the supported add, remove, and scale operations for this setup.

Scale the primary compute group

Adjust the replica count on the existing group.

opsd scale compute-group backend-api-app-platform.environment.yaml primary --replicas 2

Add a managed database

Add a supported managed database entry.

opsd add database postgres backend-api-app-platform.environment.yaml --id primary-db

Add a support node

Add a bastion or helper node and remove it again if needed.

opsd add node vm backend-api-app-platform.environment.yaml --id bastion --role bastion --profile s-1vcpu-1gb

Remove a support node

Drop a helper node when the variant supports removal.

opsd remove node backend-api-app-platform.environment.yaml bastion

Changes are not active yet

Editing the manifest changes the desired state. To make it real, validate the manifest, render the updated output, and then run `tofu apply` against the rendered directory.

opsd validate manifest backend-api-app-platform.environment.yaml
opsd render manifest backend-api-app-platform.environment.yaml --output rendered/backend-api-app-platform
cd rendered/backend-api-app-platform
tofu plan
tofu apply

Operational boundary

These are the constraints that define the supported shape for this variant.

  • No standalone VM in the base shape.
  • No managed database by default.
  • Move to a database-backed blueprint when state becomes a first-class requirement.

Related variants

Use the scenario overview to compare the other supported variants for the same blueprint.