{
  "manifest_version": "1.0.0",
  "template": {
    "id": "0d8d068b-c715-41f3-a82a-62f6d828008d",
    "slug": "mastra-workflow-evaluation-demo",
    "name": "Mastra workflow evaluation demo",
    "description": "Deterministic Mastra memory and human approval workflow demo.",
    "url": "https://railway.com/deploy/mastra-workflow-evaluation-demo",
    "upstream": {
      "repo_url": "https://github.com/tech-progress/mastra-agent-postgres"
    }
  },
  "services": [
    {
      "name": "Mastra API",
      "source": {
        "repo": "https://github.com/tech-progress/mastra-agent-postgres"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Postgres",
      "source": {
        "image": "postgres:17.11-bookworm@sha256:639ab7ceb90e13123085b741fb31ef493fba25463002f6da665352e7b534b652"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Mastra API",
      "description": "HTTP port exposed by the API service; Railway health checks use this port.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "API_TOKEN",
      "service": "Mastra API",
      "description": "Generated shared operator bearer token, at least 32 characters; protects all agent and workflow APIs.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_URL",
      "service": "Mastra API",
      "description": "Private PostgreSQL connection reference. Credentials must be URL-safe or encoded.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "DO_NOT_TRACK",
      "service": "Mastra API",
      "description": "Requests dependency telemetry opt-out.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "OPENAI_MODEL",
      "service": "Mastra API",
      "description": "Operator-selected OpenAI chat model; default gpt-4.1-mini incurs provider charges.",
      "secret": false,
      "strategy": "default",
      "default": "gpt-4.1-mini"
    },
    {
      "key": "MODEL_PROVIDER",
      "service": "Mastra API",
      "description": "offline-fixture is a deterministic evaluation test double, not an LLM. Optional openai integration is unverified and requires an authorized key.",
      "secret": false,
      "strategy": "default",
      "default": "offline-fixture"
    },
    {
      "key": "MASTRA_TELEMETRY_DISABLED",
      "service": "Mastra API",
      "description": "Disables Mastra CLI telemetry.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PORT",
      "service": "Postgres",
      "description": "Private PostgreSQL TCP port. Never publish a database service domain or TCP proxy.",
      "secret": false,
      "strategy": "default",
      "default": "5432"
    },
    {
      "key": "PGDATA",
      "service": "Postgres",
      "description": "Persistent database subdirectory inside the Railway volume.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "Postgres",
      "description": "Persistent database for conversation messages, workflow snapshots, approvals and ledger effects.",
      "secret": false,
      "strategy": "default",
      "default": "mastra"
    },
    {
      "key": "POSTGRES_USER",
      "service": "Postgres",
      "description": "Database owner used by the template; separate roles are recommended before production.",
      "secret": false,
      "strategy": "default",
      "default": "mastra"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "Postgres",
      "description": "Generated URL-safe PostgreSQL password. Preserve with the database volume.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mastra-workflow-evaluation-demo"
      }
    },
    "cli": "railway deploy --template mastra-workflow-evaluation-demo",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "0d8d068b-c715-41f3-a82a-62f6d828008d",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "a92b3f11-f4fe-4b28-9dce-81f714c77f3f": {
                  "name": "Mastra API",
                  "build": {
                    "builder": "DOCKERFILE",
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": "node .mastra/output/index.mjs",
                    "healthcheckPath": "/readyz",
                    "healthcheckTimeout": 180
                  },
                  "source": {
                    "repo": "tech-progress/mastra-agent-postgres",
                    "branch": "release-v1",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port exposed by the API service; Railway health checks use this port.",
                      "defaultValue": "3000"
                    },
                    "API_TOKEN": {
                      "isOptional": false,
                      "description": "Generated shared operator bearer token, at least 32 characters; protects all agent and workflow APIs.",
                      "defaultValue": "{{API_TOKEN}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private PostgreSQL connection reference. Credentials must be URL-safe or encoded.",
                      "defaultValue": "postgresql://${{Postgres.POSTGRES_USER}}:${{Postgres.POSTGRES_PASSWORD}}@${{Postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/${{Postgres.POSTGRES_DB}}"
                    },
                    "DO_NOT_TRACK": {
                      "isOptional": false,
                      "description": "Requests dependency telemetry opt-out.",
                      "defaultValue": "1"
                    },
                    "OPENAI_MODEL": {
                      "isOptional": false,
                      "description": "Operator-selected OpenAI chat model; default gpt-4.1-mini incurs provider charges.",
                      "defaultValue": "gpt-4.1-mini"
                    },
                    "MODEL_PROVIDER": {
                      "isOptional": false,
                      "description": "offline-fixture is a deterministic evaluation test double, not an LLM. Optional openai integration is unverified and requires an authorized key.",
                      "defaultValue": "offline-fixture"
                    },
                    "OPENAI_API_KEY": {
                      "isOptional": true,
                      "description": "Optional in the default fixture mode. Required real operator-supplied key when selecting openai; startup then fails without it and calls incur provider charges.",
                      "defaultValue": ""
                    },
                    "MASTRA_TELEMETRY_DISABLED": {
                      "isOptional": false,
                      "description": "Disables Mastra CLI telemetry.",
                      "defaultValue": "1"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 3000
                      }
                    }
                  },
                  "volumeMounts": {}
                },
                "ca858fdc-2d4e-42e7-b5ac-43a313b8863a": {
                  "name": "Postgres",
                  "build": {},
                  "deploy": {},
                  "source": {
                    "image": "postgres:17.11-bookworm@sha256:639ab7ceb90e13123085b741fb31ef493fba25463002f6da665352e7b534b652"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Private PostgreSQL TCP port. Never publish a database service domain or TCP proxy.",
                      "defaultValue": "5432"
                    },
                    "PGDATA": {
                      "isOptional": false,
                      "description": "Persistent database subdirectory inside the Railway volume.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Persistent database for conversation messages, workflow snapshots, approvals and ledger effects.",
                      "defaultValue": "mastra"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "Database owner used by the template; separate roles are recommended before production.",
                      "defaultValue": "mastra"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated URL-safe PostgreSQL password. Preserve with the database volume.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "tcpProxies": {},
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "ca858fdc-2d4e-42e7-b5ac-43a313b8863a": {
                      "sizeMB": 5000,
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Mastra API",
      "method": "GET",
      "path": "/readyz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-06T04:14:42.626Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-06T00:56:40.348Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_0e17567a686045d794e3",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 98,
    "typical_build_seconds": 71,
    "typical_start_seconds": 10,
    "slowest_service": "Mastra API"
  }
}
