{
  "manifest_version": "1.0.0",
  "template": {
    "id": "68e161ab-e828-4d66-96c0-3ea7db87284c",
    "slug": "new-api-template",
    "name": "new-api-template",
    "description": "new-api LLM gateway on Railway: MySQL+Redis, auto secrets, persistence",
    "url": "https://railway.com/deploy/new-api-template",
    "upstream": {
      "repo_url": "https://github.com/lNamelessl/new-api-railway-template"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "Redis",
      "source": {
        "image": "redis:7.4"
      },
      "needs_volume": false,
      "http": false
    },
    {
      "name": "MySQL",
      "source": {
        "image": "mysql:8.4"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/mysql",
      "http": false
    },
    {
      "name": "new-api",
      "source": {
        "repo": "https://github.com/lNamelessl/new-api-railway-template"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "REDIS_PASSWORD",
      "service": "Redis",
      "description": "Provide a value for REDIS_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "MYSQL_DATABASE",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_DATABASE.",
      "secret": false,
      "strategy": "ask_user"
    },
    {
      "key": "MYSQL_ROOT_PASSWORD",
      "service": "MySQL",
      "description": "Provide a value for MYSQL_ROOT_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "SQL_DSN",
      "service": "new-api",
      "description": "Provide a value for SQL_DSN.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "MYSQL_HOST",
      "service": "new-api",
      "description": "Provide a value for MYSQL_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "REDIS_HOST",
      "service": "new-api",
      "description": "Provide a value for REDIS_HOST.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "CRYPTO_SECRET",
      "service": "new-api",
      "description": "Provide a value for CRYPTO_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "SESSION_SECRET",
      "service": "new-api",
      "description": "Provide a value for SESSION_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "REDIS_CONN_STRING",
      "service": "new-api",
      "description": "Provide a value for REDIS_CONN_STRING.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "new-api-template"
      }
    },
    "cli": "railway deploy --template new-api-template",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "68e161ab-e828-4d66-96c0-3ea7db87284c",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "1a6aa601-8cd3-4600-8109-901f8cfcd164": {
                  "icon": null,
                  "name": "Redis",
                  "deploy": {
                    "startCommand": "sh -c 'exec redis-server --requirepass \"$REDIS_PASSWORD\"'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "redis:7.4"
                  },
                  "variables": {
                    "REDIS_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{REDIS_PASSWORD}}"
                    }
                  }
                },
                "325c4cc3-165b-4865-8829-0ba6f7891efc": {
                  "icon": null,
                  "name": "MySQL",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "mysql:8.4"
                  },
                  "variables": {
                    "MYSQL_DATABASE": {
                      "isOptional": false,
                      "defaultValue": "{{MYSQL_DATABASE}}"
                    },
                    "MYSQL_ROOT_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{MYSQL_ROOT_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "325c4cc3-165b-4865-8829-0ba6f7891efc": {
                      "mountPath": "/var/lib/mysql"
                    }
                  }
                },
                "f6ddc225-945d-4140-afb7-0e8070bdc5b2": {
                  "icon": null,
                  "name": "new-api",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/api/status",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "https://github.com/lNamelessl/new-api-railway-template",
                    "rootDirectory": null
                  },
                  "variables": {
                    "SQL_DSN": {
                      "isOptional": false,
                      "defaultValue": "root:${{MySQL.MYSQL_ROOT_PASSWORD}}@tcp(${{MySQL.RAILWAY_PRIVATE_DOMAIN}}:3306)/${{MySQL.MYSQL_DATABASE}}"
                    },
                    "MYSQL_HOST": {
                      "isOptional": false,
                      "defaultValue": "${{MySQL.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "REDIS_HOST": {
                      "isOptional": false,
                      "defaultValue": "${{Redis.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "CRYPTO_SECRET": {
                      "isOptional": false,
                      "defaultValue": "{{CRYPTO_SECRET}}"
                    },
                    "SESSION_SECRET": {
                      "isOptional": false,
                      "defaultValue": "{{SESSION_SECRET}}"
                    },
                    "REDIS_CONN_STRING": {
                      "isOptional": false,
                      "defaultValue": "redis://default:${{Redis.REDIS_PASSWORD}}@${{Redis.RAILWAY_PRIVATE_DOMAIN}}:6379"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "f6ddc225-945d-4140-afb7-0e8070bdc5b2": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "new-api",
      "method": "GET",
      "path": "/api/status",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 3,
    "needs_volume": true
  },
  "generated_at": "2026-09-17T16:15:03.821Z",
  "generator_version": "0.1.0"
}
