Configure your app¶
Your app needs one file at the repo root: mithran.yaml. It tells Forge what to build, how to start it, and where to serve it. map onboard writes a starter version for you; this page explains what to put in it.
The full field list is in the mithran.yaml reference.
A working example¶
mithran.yaml
apiVersion: map.mithran/v1
kind: MithranApp
metadata:
app_id: my-app # becomes my-app.apps.sandbox.mithran.cloud
name: My App
identity:
project_ref: you/my-app
capabilities:
- kind: http
route: /
runtime: nodejs22
startup:
command: npm start
resources:
requests:
cpu: 250m
non_secret_env:
- { name: NODE_ENV, value: production }
public_edge:
type: platform
exposure: public
app_env:
preview:
branch_pattern: "^refs/heads/.*$"
image_tag: preview
production:
branch_pattern: "^refs/heads/main$"
image_tag: prod
The fields that matter most¶
metadata.app_idsets your hostname.app_id: my-appserves atmy-app.apps.sandbox.mithran.cloud. Keep it short and DNS-friendly.capabilitiesdescribes the HTTP service: the route it answers and how to start it. Your process must listen on the port in$PORT.non_secret_envis for plain configuration. Don't put secrets here; it's committed to your repo.app_envmaps Git refs to environments. A release deploy lands inproduction; preview builds get thepreviewtag.public_edge.exposurecontrols who can reach the app.publicserves anyone;protectedmakes the edge require a signed-in Mithran session first. This portal runsprotected.
You still need a Dockerfile¶
Forge builds your repo with its Dockerfile. The manifest says what the app is; the Dockerfile says how to build it. Make sure it exposes the same port your app listens on and that GET /health returns 200 so health checks pass.
Next¶
Onboard the repo so Forge will accept deploys from it.