{
  "manifest_version": "1.0.0",
  "template": {
    "id": "81e19175-6d7f-4d94-b501-8dac6c3ec827",
    "slug": "open-emr",
    "name": "OpenEMR",
    "description": "Electronic health records and practice management for clinics",
    "url": "https://railway.com/deploy/open-emr",
    "upstream": {
      "repo_url": "https://github.com/gridalpha/openemr-railway"
    }
  },
  "services": [
    {
      "name": "MariaDB",
      "source": {
        "image": "mariadb:12.3"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "Redis",
      "source": {
        "image": "redis:8.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "OpenEMR",
      "source": {
        "repo": "https://github.com/gridalpha/openemr-railway"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/www/localhost/htdocs/openemr/sites",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "MARIADB_AUTO_UPGRADE",
      "service": "MariaDB",
      "description": "Run mariadb-upgrade on an older data directory",
      "secret": false,
      "strategy": "default",
      "default": "1"
    },
    {
      "key": "MARIADB_ROOT_PASSWORD",
      "service": "MariaDB",
      "description": "Superuser password, read by the entrypoint",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "REDISHOST",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDISPORT",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "REDISUSER",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": false,
      "strategy": "default",
      "default": "default"
    },
    {
      "key": "REDIS_URL",
      "service": "Redis",
      "description": "Private connection string",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDISPASSWORD",
      "service": "Redis",
      "description": "Data panel alias, not read by the server",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Auth password, read by the server",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "OpenEMR",
      "description": "Apache listening port",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "OE_PASS",
      "service": "OpenEMR",
      "description": "First administrator password",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "OE_USER",
      "service": "OpenEMR",
      "description": "First administrator username",
      "secret": false,
      "strategy": "default",
      "default": "admin"
    },
    {
      "key": "MYSQL_HOST",
      "service": "OpenEMR",
      "description": "Private database hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_PASS",
      "service": "OpenEMR",
      "description": "Password for that account",
      "secret": false,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "MYSQL_PORT",
      "service": "OpenEMR",
      "description": "Database port",
      "secret": false,
      "strategy": "default",
      "default": "3306"
    },
    {
      "key": "MYSQL_USER",
      "service": "OpenEMR",
      "description": "Scoped account OpenEMR runs as",
      "secret": false,
      "strategy": "default",
      "default": "openemr"
    },
    {
      "key": "REDIS_PORT",
      "service": "OpenEMR",
      "description": "Session store port",
      "secret": false,
      "strategy": "default",
      "default": "6379"
    },
    {
      "key": "OE_USER_NAME",
      "service": "OpenEMR",
      "description": "First administrator display name",
      "secret": false,
      "strategy": "default",
      "default": "Administrator"
    },
    {
      "key": "REDIS_SERVER",
      "service": "OpenEMR",
      "description": "Session store host, bare hostname",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "OpenEMR",
      "description": "Database created at install",
      "secret": false,
      "strategy": "default",
      "default": "openemr"
    },
    {
      "key": "REDIS_PASSWORD",
      "service": "OpenEMR",
      "description": "Session store password",
      "secret": true,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_PASS",
      "service": "OpenEMR",
      "description": "Creates the app database and role",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "MYSQL_ROOT_USER",
      "service": "OpenEMR",
      "description": "Admin role used once at install",
      "secret": false,
      "strategy": "default",
      "default": "root"
    },
    {
      "key": "SESSION_STORAGE_MODE",
      "service": "OpenEMR",
      "description": "Tells the health endpoint where sessions live",
      "secret": false,
      "strategy": "default",
      "default": "redis"
    },
    {
      "key": "OPENEMR_SETTING_site_addr_oath",
      "service": "OpenEMR",
      "description": "Base URL for OAuth2 and FHIR",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_HEALTHCHECK_TIMEOUT_SEC",
      "service": "OpenEMR",
      "description": "First boot installs the schema",
      "secret": false,
      "strategy": "default",
      "default": "900"
    },
    {
      "key": "RAILWAY_DEPLOYMENT_DRAINING_SECONDS",
      "service": "OpenEMR",
      "description": "Clean shutdown window",
      "secret": false,
      "strategy": "default",
      "default": "15"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "open-emr"
      }
    },
    "cli": "railway deploy --template open-emr",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "81e19175-6d7f-4d94-b501-8dac6c3ec827",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "b092c202-1965-4b2d-a7dc-ba65d31d54e9": {
                  "icon": "https://cdn.jsdelivr.net/gh/gridalpha/openemr-railway@9fc62adf4ca65bec49785e5a7884374eec1ce2d6/icons/mariadb-light.svg",
                  "name": "MariaDB",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'M=$(cat /sys/fs/cgroup/memory.max 2>/dev/null || echo max); case \"$M\" in max|\"\") M=2147483648;; esac; P=$((M/1024/1024/4)); if [ \"$P\" -lt 128 ]; then P=128; fi; echo \"[railway] innodb-buffer-pool-size=${P}M (memory.max=$M)\"; exec docker-entrypoint.sh mariadbd --character-set-server=utf8mb4 --datadir=/var/lib/mysql/data --innodb-buffer-pool-size=${P}M'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ALWAYS",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mariadb:12.3"
                  },
                  "variables": {
                    "MARIADB_AUTO_UPGRADE": {
                      "isOptional": false,
                      "description": "Run mariadb-upgrade on an older data directory",
                      "defaultValue": "1"
                    },
                    "MARIADB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Superuser password, read by the entrypoint",
                      "defaultValue": "{{MARIADB_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "b092c202-1965-4b2d-a7dc-ba65d31d54e9": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "b541cbfb-aa9d-4db5-8f80-2b9a2d8c3aae": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/redis.svg",
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "/bin/sh -c \"rm -rf $RAILWAY_VOLUME_MOUNT_PATH/lost+found/ && exec docker-entrypoint.sh redis-server --requirepass $REDIS_PASSWORD --save 60 1 --dir $RAILWAY_VOLUME_MOUNT_PATH\"",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:8.2"
                  },
                  "variables": {
                    "REDISHOST": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDISPORT": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "6379"
                    },
                    "REDISUSER": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "default"
                    },
                    "REDIS_URL": {
                      "isOptional": false,
                      "description": "Private connection string",
                      "defaultValue": "redis://${{REDISUSER}}:${{REDIS_PASSWORD}}@${{REDISHOST}}:${{REDISPORT}}"
                    },
                    "REDISPASSWORD": {
                      "isOptional": false,
                      "description": "Data panel alias, not read by the server",
                      "defaultValue": "${{REDIS_PASSWORD}}"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Auth password, read by the server",
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "b541cbfb-aa9d-4db5-8f80-2b9a2d8c3aae": {
                      "mountPath": "/data"
                    }
                  }
                },
                "f06f7ba6-3ae0-4a12-9c59-86cb046f1f18": {
                  "icon": "https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/openemr-light.svg",
                  "name": "OpenEMR",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/meta/health/readyz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/gridalpha/openemr-railway",
                    "rootDirectory": null
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Apache listening port",
                      "defaultValue": "80"
                    },
                    "OE_PASS": {
                      "isOptional": false,
                      "description": "First administrator password",
                      "defaultValue": "{{OE_PASS}}"
                    },
                    "OE_USER": {
                      "isOptional": false,
                      "description": "First administrator username",
                      "defaultValue": "admin"
                    },
                    "MYSQL_HOST": {
                      "isOptional": false,
                      "description": "Private database hostname",
                      "defaultValue": "${{MariaDB.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQL_PASS": {
                      "isOptional": false,
                      "description": "Password for that account",
                      "defaultValue": "{{MYSQL_PASS}}"
                    },
                    "MYSQL_PORT": {
                      "isOptional": false,
                      "description": "Database port",
                      "defaultValue": "3306"
                    },
                    "MYSQL_USER": {
                      "isOptional": false,
                      "description": "Scoped account OpenEMR runs as",
                      "defaultValue": "openemr"
                    },
                    "REDIS_PORT": {
                      "isOptional": false,
                      "description": "Session store port",
                      "defaultValue": "6379"
                    },
                    "OE_USER_NAME": {
                      "isOptional": false,
                      "description": "First administrator display name",
                      "defaultValue": "Administrator"
                    },
                    "REDIS_SERVER": {
                      "isOptional": false,
                      "description": "Session store host, bare hostname",
                      "defaultValue": "${{Redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "description": "Database created at install",
                      "defaultValue": "openemr"
                    },
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "description": "Session store password",
                      "defaultValue": "${{Redis.REDIS_PASSWORD}}"
                    },
                    "MYSQL_ROOT_PASS": {
                      "isOptional": false,
                      "description": "Creates the app database and role",
                      "defaultValue": "${{MariaDB.MARIADB_ROOT_PASSWORD}}"
                    },
                    "MYSQL_ROOT_USER": {
                      "isOptional": false,
                      "description": "Admin role used once at install",
                      "defaultValue": "root"
                    },
                    "SESSION_STORAGE_MODE": {
                      "isOptional": false,
                      "description": "Tells the health endpoint where sessions live",
                      "defaultValue": "redis"
                    },
                    "OPENEMR_SETTING_site_addr_oath": {
                      "isOptional": false,
                      "description": "Base URL for OAuth2 and FHIR",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_HEALTHCHECK_TIMEOUT_SEC": {
                      "isOptional": false,
                      "description": "First boot installs the schema",
                      "defaultValue": "900"
                    },
                    "RAILWAY_DEPLOYMENT_DRAINING_SECONDS": {
                      "isOptional": false,
                      "description": "Clean shutdown window",
                      "defaultValue": "15"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:80": {
                        "port": 80
                      }
                    }
                  },
                  "volumeMounts": {
                    "f06f7ba6-3ae0-4a12-9c59-86cb046f1f18": {
                      "mountPath": "/var/www/localhost/htdocs/openemr/sites"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "OpenEMR",
      "method": "GET",
      "path": "/meta/health/readyz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-15T22:14:40.394Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-15T19:08:06.056Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_ebeac7b2d3994c789221",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 227,
    "typical_build_seconds": 81,
    "typical_start_seconds": 101,
    "slowest_service": "OpenEMR"
  }
}
