{
  "manifest_version": "1.0.0",
  "template": {
    "id": "882f2a9e-bae0-4417-b58f-ce328fde70a7",
    "slug": "mongodb-9-single-replica-set",
    "name": "MongoDB 9 Single Replica Set",
    "description": "MongoDB 9 single-node replica set. Persistent data and transaction support.",
    "url": "https://railway.com/deploy/mongodb-9-single-replica-set",
    "upstream": {
      "repo_url": "https://github.com/ventry-es/railway-mongodb-single-replica"
    }
  },
  "services": [
    {
      "name": "mongodb",
      "source": {
        "repo": "https://github.com/ventry-es/railway-mongodb-single-replica"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "MONGO_URL",
      "service": "mongodb",
      "description": "MongoDB connection string for applications running within the Railway private network. Includes authentication and replica set configuration.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "mongodb",
      "description": "Runtime user ID used by the container. Set to 0 to run as root when required by the MongoDB container setup.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    },
    {
      "key": "MONGO_REPLICA_SET_NAME",
      "service": "mongodb",
      "description": "Name of the MongoDB replica set. Defaults to rs0 for single-node replica set functionality.",
      "secret": false,
      "strategy": "default",
      "default": "rs0"
    },
    {
      "key": "MONGO_INITDB_ROOT_PASSWORD",
      "service": "mongodb",
      "description": "Root password for MongoDB authentication. Generated securely for each deployment; keep this secret.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MONGO_INITDB_ROOT_USERNAME",
      "service": "mongodb",
      "description": "Username for the MongoDB root administrator account. Defaults to root.",
      "secret": false,
      "strategy": "default",
      "default": "root"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "mongodb-9-single-replica-set"
      }
    },
    "cli": "railway deploy --template mongodb-9-single-replica-set",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "882f2a9e-bae0-4417-b58f-ce328fde70a7",
            "serializedConfig": {
              "services": {
                "747ea398-0b6a-41d0-bdae-e99ba2a31285": {
                  "icon": "https://icon.icepanel.io/Technology/svg/MongoDB.svg",
                  "name": "mongodb",
                  "source": {
                    "repo": "ventry-es/railway-mongodb-single-replica",
                    "rootDirectory": "/mongo"
                  },
                  "variables": {
                    "MONGO_URL": {
                      "isOptional": false,
                      "description": "MongoDB connection string for applications running within the Railway private network. Includes authentication and replica set configuration.",
                      "defaultValue": "mongodb://${{MONGO_INITDB_ROOT_USERNAME}}:${{MONGO_INITDB_ROOT_PASSWORD}}@${{RAILWAY_PRIVATE_DOMAIN}}:27017/?replicaSet=${{MONGO_REPLICA_SET_NAME}}&authSource=admin"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Runtime user ID used by the container. Set to 0 to run as root when required by the MongoDB container setup.",
                      "defaultValue": "0"
                    },
                    "MONGO_REPLICA_SET_NAME": {
                      "isOptional": false,
                      "description": "Name of the MongoDB replica set. Defaults to rs0 for single-node replica set functionality.",
                      "defaultValue": "rs0"
                    },
                    "MONGO_INITDB_ROOT_PASSWORD": {
                      "isOptional": false,
                      "description": "Root password for MongoDB authentication. Generated securely for each deployment; keep this secret.",
                      "defaultValue": "{{MONGO_INITDB_ROOT_PASSWORD}}"
                    },
                    "MONGO_INITDB_ROOT_USERNAME": {
                      "isOptional": false,
                      "description": "Username for the MongoDB root administrator account. Defaults to root.",
                      "defaultValue": "root"
                    }
                  },
                  "volumeMounts": {
                    "747ea398-0b6a-41d0-bdae-e99ba2a31285": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-10-15T10:14:43.780Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-15T09:07:17.165Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_5080e25a73a542d59da1",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 168,
    "typical_build_seconds": 40,
    "typical_start_seconds": 20,
    "slowest_service": "mongodb"
  }
}
