{
  "manifest_version": "1.0.0",
  "template": {
    "id": "7612d747-d443-4aff-a113-7f6b47cd45fc",
    "slug": "railway-ram-restart",
    "name": "Railway RAM restart",
    "description": "monitoring service memory usage or automatically restarting services",
    "url": "https://railway.com/deploy/railway-ram-restart",
    "upstream": {
      "repo_url": "https://github.com/sarvesh-astrophile/railway-templates-ram-restart"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Railway RAM restart",
      "source": {
        "repo": "https://github.com/sarvesh-astrophile/railway-templates-ram-restart"
      },
      "needs_volume": false,
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "RAILWAY_API_TOKEN",
      "service": "Railway RAM restart",
      "description": "generate token from https://railway.com/account/tokens",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "RAILWAY_PROJECT_ID",
      "service": "Railway RAM restart",
      "description": "Look at the URL: `https://railway.app/project/<PROJECT_ID>`",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "TARGET_SERVICE_NAME",
      "service": "Railway RAM restart",
      "description": "Id of service, Look at URL `https://railway.com/project/<PROJECT_ID>/service/<SERVICE_ID>?environmentId=<ENVIRONMENT_ID>`",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RAILWAY_ENVIRONMENT_ID",
      "service": "Railway RAM restart",
      "description": "Look at the URL: `https://railway.com/project/<PROJECT_ID>/service/<SERVICE_ID>?environmentId=<ENVIRONMENT_ID>``",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "RAILWAY_ENVIRONMENT_NAME",
      "service": "Railway RAM restart",
      "description": "name of environment, default production",
      "secret": false,
      "strategy": "ask_user"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "railway-ram-restart"
      }
    },
    "cli": "railway deploy --template railway-ram-restart",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "7612d747-d443-4aff-a113-7f6b47cd45fc",
            "serializedConfig": {
              "services": {
                "e33781b4-b86f-4854-8bb0-aa08ebb0b296": {
                  "icon": "https://i.ibb.co/fzLR4JZc/Challenge-Logos-3.png",
                  "name": "Railway RAM restart",
                  "source": {
                    "repo": "sarvesh-astrophile/railway-templates-ram-restart",
                    "branch": null,
                    "rootDirectory": "/template-1-cron"
                  },
                  "variables": {
                    "MAX_RAM_GB": {
                      "isOptional": true,
                      "description": "The memory threshold in gigabytes. When the service exceeds this RAM usage, it will be restarted (if monitoring is enabled). Example: `2`, `4`, `8`",
                      "defaultValue": ""
                    },
                    "RAILWAY_API_TOKEN": {
                      "description": "generate token from https://railway.com/account/tokens",
                      "defaultValue": "{{RAILWAY_API_TOKEN}}"
                    },
                    "RAILWAY_PROJECT_ID": {
                      "description": "Look at the URL: `https://railway.app/project/<PROJECT_ID>`",
                      "defaultValue": "{{RAILWAY_PROJECT_ID}}"
                    },
                    "TARGET_SERVICE_NAME": {
                      "description": "Id of service, Look at URL `https://railway.com/project/<PROJECT_ID>/service/<SERVICE_ID>?environmentId=<ENVIRONMENT_ID>`",
                      "defaultValue": "{{TARGET_SERVICE_NAME}}"
                    },
                    "CRON_INTERVAL_RESTART": {
                      "isOptional": true,
                      "description": "Cron schedule for scheduled restarts. Use this for periodic restarts regardless of memory usage. Example: `0 4 * * *` (daily at 4 AM)",
                      "defaultValue": ""
                    },
                    "RAILWAY_ENVIRONMENT_ID": {
                      "description": "Look at the URL: `https://railway.com/project/<PROJECT_ID>/service/<SERVICE_ID>?environmentId=<ENVIRONMENT_ID>``",
                      "defaultValue": "{{RAILWAY_ENVIRONMENT_ID}}"
                    },
                    "RAILWAY_ENVIRONMENT_NAME": {
                      "description": "name of environment, default production",
                      "defaultValue": "{{RAILWAY_ENVIRONMENT_NAME}}"
                    },
                    "MAX_RAM_CRON_INTERVAL_CHECK": {
                      "isOptional": true,
                      "description": "Cron schedule for checking memory usage. When set, the monitor will periodically check if the service exceeds `MAX_RAM_GB` and restart it if necessary. Example: `*/1 * * * *` (every minute)",
                      "defaultValue": ""
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {},
  "resources": {
    "expected_services": 1,
    "needs_volume": false
  },
  "generated_at": "2026-09-20T22:14:37.505Z",
  "generator_version": "0.1.0"
}
