Skip to content

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_id sets your hostname. app_id: my-app serves at my-app.apps.sandbox.mithran.cloud. Keep it short and DNS-friendly.
  • capabilities describes the HTTP service: the route it answers and how to start it. Your process must listen on the port in $PORT.
  • non_secret_env is for plain configuration. Don't put secrets here; it's committed to your repo.
  • app_env maps Git refs to environments. A release deploy lands in production; preview builds get the preview tag.
  • public_edge.exposure controls who can reach the app. public serves anyone; protected makes the edge require a signed-in Mithran session first. This portal runs protected.

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.