{
  "manifest_version": "1.0.0",
  "template": {
    "id": "82fc4a12-98aa-4e5f-8bbb-d6025b65af63",
    "slug": "promptfoo-evaluation",
    "name": "Promptfoo evaluation",
    "description": "Private Promptfoo evaluation and red teaming with persistent project data.",
    "url": "https://railway.com/deploy/promptfoo-evaluation",
    "upstream": {
      "image": "caddy:2.10-alpine@sha256:4c6e91c6ed0e2fa03efd5b44747b625fec79bc9cd06ac5235a779726618e530d"
    }
  },
  "services": [
    {
      "name": "Promptfoo Gateway",
      "source": {
        "image": "caddy:2.10-alpine@sha256:4c6e91c6ed0e2fa03efd5b44747b625fec79bc9cd06ac5235a779726618e530d"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "Promptfoo",
      "source": {
        "repo": "https://github.com/tech-progress/railway-template-promptfoo"
      },
      "needs_volume": true,
      "volume_mount_path": "/home/promptfoo/.promptfoo",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "Promptfoo Gateway",
      "description": "Railway listener port for the public Basic Auth gateway.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "PROMPTFOO_PASSWORD",
      "service": "Promptfoo Gateway",
      "description": "Generated password required by the public Basic Auth gateway.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PROMPTFOO_UPSTREAM",
      "service": "Promptfoo Gateway",
      "description": "Private Promptfoo UI and API endpoint.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PROMPTFOO_USERNAME",
      "service": "Promptfoo Gateway",
      "description": "Username required by the public Basic Auth gateway.",
      "secret": false,
      "strategy": "default",
      "default": "promptfoo"
    },
    {
      "key": "HOST",
      "service": "Promptfoo",
      "description": "Container network binding for the Promptfoo server.",
      "secret": false,
      "strategy": "default",
      "default": "0.0.0.0"
    },
    {
      "key": "PORT",
      "service": "Promptfoo",
      "description": "Railway listener port for the private Promptfoo service.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "API_PORT",
      "service": "Promptfoo",
      "description": "HTTP port used by Promptfoo's self-hosted server.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "PROMPTFOO_CONFIG_DIR",
      "service": "Promptfoo",
      "description": "Persistent directory for Promptfoo's SQLite database and configuration.",
      "secret": false,
      "strategy": "default",
      "default": "/home/promptfoo/.promptfoo"
    },
    {
      "key": "PROMPTFOO_SELF_HOSTED",
      "service": "Promptfoo",
      "description": "Enables Promptfoo's self-hosted server behavior.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PROMPTFOO_DISABLE_UPDATE",
      "service": "Promptfoo",
      "description": "Disables Promptfoo update checks.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PROMPTFOO_DISABLE_SHARING",
      "service": "Promptfoo",
      "description": "Disables uploads to Promptfoo's hosted sharing service.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PROMPTFOO_DISABLE_TELEMETRY",
      "service": "Promptfoo",
      "description": "Disables Promptfoo telemetry.",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "PROMPTFOO_DISABLE_REMOTE_GENERATION",
      "service": "Promptfoo",
      "description": "Keeps generation and grading on this deployment instead of Promptfoo-hosted services.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "promptfoo-evaluation"
      }
    },
    "cli": "railway deploy --template promptfoo-evaluation",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "82fc4a12-98aa-4e5f-8bbb-d6025b65af63",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "5fadbbd3-c328-4b0e-aa22-4a787edd5567": {
                  "icon": null,
                  "name": "Promptfoo Gateway",
                  "deploy": {
                    "startCommand": "/bin/sh -ec 'password_hash=\"$(caddy hash-password --plaintext \"$PROMPTFOO_PASSWORD\")\"; printf '\"'\"':8080 {\\n handle /healthz {\\n  respond \"ok\" 200\\n }\\n handle {\\n  basic_auth {\\n   %s %s\\n  }\\n  reverse_proxy %s\\n }\\n}\\n'\"'\"' \"$PROMPTFOO_USERNAME\" \"$password_hash\" \"$PROMPTFOO_UPSTREAM\" >/tmp/Caddyfile; exec caddy run --config /tmp/Caddyfile --adapter caddyfile'",
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "caddy:2.10-alpine@sha256:4c6e91c6ed0e2fa03efd5b44747b625fec79bc9cd06ac5235a779726618e530d"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Railway listener port for the public Basic Auth gateway.",
                      "defaultValue": "8080"
                    },
                    "PROMPTFOO_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated password required by the public Basic Auth gateway.",
                      "defaultValue": "{{PROMPTFOO_PASSWORD}}"
                    },
                    "PROMPTFOO_UPSTREAM": {
                      "isOptional": false,
                      "description": "Private Promptfoo UI and API endpoint.",
                      "defaultValue": "http://${{Promptfoo.RAILWAY_PRIVATE_DOMAIN}}:3000"
                    },
                    "PROMPTFOO_USERNAME": {
                      "isOptional": false,
                      "description": "Username required by the public Basic Auth gateway.",
                      "defaultValue": "promptfoo"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {
                        "port": 8080
                      }
                    }
                  }
                },
                "63a17555-e460-4882-9abb-b2b46f68fd76": {
                  "icon": null,
                  "name": "Promptfoo",
                  "build": {
                    "builder": "DOCKERFILE",
                    "watchPatterns": [
                      "/Dockerfile",
                      "/railway-entrypoint.sh"
                    ],
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/health",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 300,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "tech-progress/railway-template-promptfoo",
                    "branch": "release-v1",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "HOST": {
                      "isOptional": false,
                      "description": "Container network binding for the Promptfoo server.",
                      "defaultValue": "0.0.0.0"
                    },
                    "PORT": {
                      "isOptional": false,
                      "description": "Railway listener port for the private Promptfoo service.",
                      "defaultValue": "3000"
                    },
                    "API_PORT": {
                      "isOptional": false,
                      "description": "HTTP port used by Promptfoo's self-hosted server.",
                      "defaultValue": "3000"
                    },
                    "PROMPTFOO_CONFIG_DIR": {
                      "isOptional": false,
                      "description": "Persistent directory for Promptfoo's SQLite database and configuration.",
                      "defaultValue": "/home/promptfoo/.promptfoo"
                    },
                    "PROMPTFOO_SELF_HOSTED": {
                      "isOptional": false,
                      "description": "Enables Promptfoo's self-hosted server behavior.",
                      "defaultValue": "1"
                    },
                    "PROMPTFOO_DISABLE_UPDATE": {
                      "isOptional": false,
                      "description": "Disables Promptfoo update checks.",
                      "defaultValue": "1"
                    },
                    "PROMPTFOO_DISABLE_SHARING": {
                      "isOptional": false,
                      "description": "Disables uploads to Promptfoo's hosted sharing service.",
                      "defaultValue": "1"
                    },
                    "PROMPTFOO_DISABLE_TELEMETRY": {
                      "isOptional": false,
                      "description": "Disables Promptfoo telemetry.",
                      "defaultValue": "1"
                    },
                    "PROMPTFOO_DISABLE_REMOTE_GENERATION": {
                      "isOptional": false,
                      "description": "Keeps generation and grading on this deployment instead of Promptfoo-hosted services.",
                      "defaultValue": "true"
                    }
                  },
                  "volumeMounts": {
                    "63a17555-e460-4882-9abb-b2b46f68fd76": {
                      "sizeMB": 5000,
                      "mountPath": "/home/promptfoo/.promptfoo"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "Promptfoo Gateway",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T16:14:52.212Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-07T18:01:16.812Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_a2ebd2ea31ac4b06a72f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 232,
    "typical_build_seconds": 0,
    "typical_start_seconds": 20,
    "slowest_service": "Promptfoo Gateway"
  }
}
