{
  "manifest_version": "1.0.0",
  "template": {
    "id": "952fa431-29a4-429d-99a1-572eca4980fd",
    "slug": "openemr",
    "name": "OpenEMR",
    "description": "Electronic medical records and practice management — self-hosted EHR",
    "url": "https://railway.com/deploy/openemr",
    "upstream": {
      "repo_url": "https://github.com/nomideusz/openemr-railway"
    }
  },
  "services": [
    {
      "name": "openemr",
      "source": {
        "repo": "https://github.com/nomideusz/openemr-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/www/localhost/htdocs/openemr/sites",
      "http": true
    },
    {
      "name": "mysql",
      "source": {
        "repo": "https://github.com/nomideusz/openemr-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "OE_PASS",
      "service": "openemr",
      "description": "Auto-generated OpenEMR admin password - change it after first login",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "OE_USER",
      "service": "openemr",
      "description": "OpenEMR admin username, created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "MYSQL_HOST",
      "service": "openemr",
      "description": "Wired to the bundled MySQL - leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_PASS",
      "service": "openemr",
      "description": "Auto-generated application database password",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MYSQL_USER",
      "service": "openemr",
      "description": "Application database user, created on first boot",
      "secret": false,
      "strategy": "default",
      "default": "openemr"
    },
    {
      "key": "MYSQL_ROOT_PASS",
      "service": "openemr",
      "description": "Root credentials for first-boot database creation - leave as is",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "mysql",
      "description": "Auto-generated MySQL root password",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "openemr"
      }
    },
    "cli": "railway deploy --template openemr",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "952fa431-29a4-429d-99a1-572eca4980fd",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "0e30e310-0001-4000-8000-000000000001": {
                  "icon": "https://github.com/openemr.png",
                  "name": "openemr",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/interface/login/login.php?site=default",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 900,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/openemr-railway",
                    "rootDirectory": "/"
                  },
                  "variables": {
                    "OE_PASS": {
                      "isOptional": false,
                      "description": "Auto-generated OpenEMR admin password - change it after first login",
                      "defaultValue": "{{OE_PASS}}"
                    },
                    "OE_USER": {
                      "isOptional": false,
                      "description": "OpenEMR admin username, created on first boot",
                      "defaultValue": "admin"
                    },
                    "MYSQL_HOST": {
                      "isOptional": false,
                      "description": "Wired to the bundled MySQL - leave as is",
                      "defaultValue": "${{mysql.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQL_PASS": {
                      "isOptional": false,
                      "description": "Auto-generated application database password",
                      "defaultValue": "{{MYSQL_PASS}}"
                    },
                    "MYSQL_USER": {
                      "isOptional": false,
                      "description": "Application database user, created on first boot",
                      "defaultValue": "openemr"
                    },
                    "MYSQL_ROOT_PASS": {
                      "isOptional": false,
                      "description": "Root credentials for first-boot database creation - leave as is",
                      "defaultValue": "${{mysql.MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "0e30e310-0001-4000-8000-000000000001": {
                      "mountPath": "/var/www/localhost/htdocs/openemr/sites"
                    }
                  }
                },
                "0e30e310-0002-4000-8000-000000000002": {
                  "icon": "https://www.mysql.com/common/logos/logo-mysql-170x115.png",
                  "name": "mysql",
                  "build": {
                    "dockerfilePath": "Dockerfile"
                  },
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/nomideusz/openemr-railway",
                    "rootDirectory": "/mysql"
                  },
                  "variables": {
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Auto-generated MySQL root password",
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "0e30e310-0002-4000-8000-000000000002": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "openemr",
      "method": "GET",
      "path": "/interface/login/login.php?site=default",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T22:14:43.398Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-09-08T22:53:09.185Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_9856d67b85b94e2fabca",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "DEPLOYING,SUCCESS"
      }
    ]
  }
}
