apphost.database.attach ​
Attach Orkestia AppData Postgres (the app's own instance on dbhost) as DATABASE_URL on a claimed AppHost site. Not Neon.
Attach the site's AppData Postgres instance as DATABASE_URL.
Overview ​
| Property | Value |
|---|---|
| Workflow type | Dag |
| Library | App-apphost |
| Version | 1.0 |
Input Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | Yes | — | Claimed AppHost site (uses its identity app) |
Output Schema ​
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
site_uuid | uuid | No | — | — |
site | json | No | — | — |
provision | json | No | — | — |
credential | json | No | — | — |
sync | json | No | — | — |
secret | json | No | — | — |
ack | json | No | — | — |
failure_reason | string | No | — | Engine-stamped failure reason |
failure_type | string | No | — | Stable failure classification |
failed_action | string | No | — | Action that failed |
failed_at_state | string | No | — | State when the workflow failed |
failed_step | json | No | — | Failed DAG step envelope |
failed_layer | json | No | — | Failed DAG layer envelope |
error | string | No | — | Engine-stamped exception message |
error_type | string | No | — | Engine-stamped exception class name |
compensation_trigger | json | No | — | — |
comp_queue | json | No | — | — |
comp_current_layer | json | No | — | — |
comp_retry_count | json | No | — | — |
DAG Layers ​
| # | Layer | Steps | Compensation |
|---|---|---|---|
| 1 | resolve | apphost.database.prepare | apphost.web.ack |
| 2 | provision | appdata.instance.provision | apphost.web.ack |
| 3 | credential | appdata.credential.ensure-app | apphost.web.ack |
| 4 | apply | k8s.manifest.sync | apphost.web.ack |
| 5 | secret | kubernetes.secret.ensure | — |
Execution Flow ​
Compensation ​
When any layer fails, its compensation steps run in reverse order to roll back the work completed so far.
Sub-workflows ​
| Sub-workflow | Step name |
|---|---|
apphost.database.prepare | site |
appdata.instance.provision | provision |
appdata.credential.ensure-app | credential |
k8s.manifest.sync | sync |
kubernetes.secret.ensure | secret |
apphost.web.ack | ack |
Outcomes ​
| Outcome | Type | Description | State Data Keys |
|---|---|---|---|
attached | SUCCESS | AppData DATABASE_URL applied in the site namespace | site, provision, credential, sync, secret |
failed | FAILURE | Apphost workflow failed | failure_reason |
API Usage ​
bash
POST /api/workflows/start
Content-Type: application/json
{
"workflow_type": "apphost.database.attach",
"initial_data": {
"site_uuid": "value"
}
}