{
  "manifest_version": "1.0.0",
  "template": {
    "id": "b31fb971-e1ec-4d90-aaec-93d0b11442e6",
    "slug": "codex-auto-reset",
    "name": "Codex Auto Reset",
    "description": "Automatically redeem eligible Codex full resets before they expire.",
    "url": "https://railway.com/deploy/codex-auto-reset",
    "upstream": {
      "image": "ghcr.io/marckrenn/codex-auto-reset-docker:0.2.2"
    }
  },
  "services": [
    {
      "name": "codex-auto-reset",
      "source": {
        "image": "ghcr.io/marckrenn/codex-auto-reset-docker:0.2.2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "codex-auto-reset",
      "description": "Internal HTTP port used by Railway.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "MASTER_KEY",
      "service": "codex-auto-reset",
      "description": "Dashboard password and encryption key. Generated uniquely for every deployment.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "PUBLIC_URL",
      "service": "codex-auto-reset",
      "description": "Public HTTPS origin generated by Railway.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_domain"
    },
    {
      "key": "RAILWAY_RUN_UID",
      "service": "codex-auto-reset",
      "description": "Required because Railway mounts persistent volumes as root.",
      "secret": false,
      "strategy": "default",
      "default": "0"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "codex-auto-reset"
      }
    },
    "cli": "railway deploy --template codex-auto-reset",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "b31fb971-e1ec-4d90-aaec-93d0b11442e6",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "460e4382-fa55-408c-8bb7-6319843cd4c4": {
                  "icon": null,
                  "name": "codex-auto-reset",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/marckrenn/codex-auto-reset-docker:0.2.2"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "Internal HTTP port used by Railway.",
                      "defaultValue": "3000"
                    },
                    "MASTER_KEY": {
                      "isOptional": false,
                      "description": "Dashboard password and encryption key. Generated uniquely for every deployment.",
                      "defaultValue": "{{MASTER_KEY}}"
                    },
                    "PUBLIC_URL": {
                      "isOptional": false,
                      "description": "Public HTTPS origin generated by Railway.",
                      "defaultValue": "https://${{RAILWAY_PUBLIC_DOMAIN}}"
                    },
                    "RAILWAY_RUN_UID": {
                      "isOptional": false,
                      "description": "Required because Railway mounts persistent volumes as root.",
                      "defaultValue": "0"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "460e4382-fa55-408c-8bb7-6319843cd4c4": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "codex-auto-reset",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 1,
    "needs_volume": true
  },
  "generated_at": "2026-09-10T10:14:45.332Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-08T23:43:00.013Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_8858bb21bbbd4f3e9e8c",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 92,
    "typical_build_seconds": 0,
    "typical_start_seconds": 0,
    "slowest_service": "codex-auto-reset"
  }
}
