{
  "manifest_version": "1.0.0",
  "template": {
    "id": "76fd9148-e5dd-4b90-af1d-a1c877550b6c",
    "slug": "backrest-repository-manager",
    "name": "Backrest Repository Manager",
    "description": "Manage restic repositories, browse snapshots and restore files privately.",
    "url": "https://railway.com/deploy/backrest-repository-manager",
    "upstream": {
      "repo_url": "https://github.com/orenaksakal/railway-templates"
    }
  },
  "services": [
    {
      "name": "core",
      "source": {
        "image": "ghcr.io/garethgeorge/backrest:v1.14.1@sha256:b852979754281026230cc69fb11428e6d57c9a97784ab4a444ffc7934c53a215"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": false
    },
    {
      "name": "backrest",
      "source": {
        "repo": "https://github.com/orenaksakal/railway-templates"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "TZ",
      "service": "core",
      "description": "Tz for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "UTC"
    },
    {
      "key": "BACKREST_DATA",
      "service": "core",
      "description": "Backrest data for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/data/state"
    },
    {
      "key": "BACKREST_PORT",
      "service": "core",
      "description": "Backrest port for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "[::]:9898"
    },
    {
      "key": "XDG_CACHE_HOME",
      "service": "core",
      "description": "Xdg cache home for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/tmp/cache"
    },
    {
      "key": "BACKREST_CONFIG",
      "service": "core",
      "description": "Backrest config for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/data/config.json"
    },
    {
      "key": "XDG_CONFIG_HOME",
      "service": "core",
      "description": "Xdg config home for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/data/config"
    },
    {
      "key": "BACKREST_RESTIC_COMMAND",
      "service": "core",
      "description": "Backrest restic command for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "/bin/restic"
    },
    {
      "key": "PORT",
      "service": "backrest",
      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
      "secret": false,
      "strategy": "default",
      "default": "8080"
    },
    {
      "key": "OWNER_AUTH",
      "service": "backrest",
      "description": "Owner auth for backrest. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OWNER_SCOPE",
      "service": "backrest",
      "description": "Owner scope for backrest. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "all"
    },
    {
      "key": "UPSTREAM_HOST",
      "service": "backrest",
      "description": "Upstream host resolved automatically from the linked service. Keep this reference when using the included topology.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "UPSTREAM_PORT",
      "service": "backrest",
      "description": "Upstream port for backrest. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "9898"
    },
    {
      "key": "ACCESS_PASSWORD",
      "service": "backrest",
      "description": "Generated access password. Keep private and preserve with backups.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "backrest",
      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
      "secret": false,
      "strategy": "default",
      "default": "shared/round10-gateway/Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "backrest-repository-manager"
      }
    },
    "cli": "railway deploy --template backrest-repository-manager",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "76fd9148-e5dd-4b90-af1d-a1c877550b6c",
            "serializedConfig": {
              "services": {
                "3dc2e604-958d-5a72-9e50-370559f0a5f4": {
                  "name": "core",
                  "deploy": {
                    "requiredMountPath": "/data",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/garethgeorge/backrest:v1.14.1@sha256:b852979754281026230cc69fb11428e6d57c9a97784ab4a444ffc7934c53a215"
                  },
                  "variables": {
                    "TZ": {
                      "isOptional": false,
                      "description": "Tz for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "UTC"
                    },
                    "BACKREST_DATA": {
                      "isOptional": false,
                      "description": "Backrest data for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/data/state"
                    },
                    "BACKREST_PORT": {
                      "isOptional": false,
                      "description": "Backrest port for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "[::]:9898"
                    },
                    "XDG_CACHE_HOME": {
                      "isOptional": false,
                      "description": "Xdg cache home for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/tmp/cache"
                    },
                    "BACKREST_CONFIG": {
                      "isOptional": false,
                      "description": "Backrest config for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/data/config.json"
                    },
                    "XDG_CONFIG_HOME": {
                      "isOptional": false,
                      "description": "Xdg config home for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/data/config"
                    },
                    "BACKREST_RESTIC_COMMAND": {
                      "isOptional": false,
                      "description": "Backrest restic command for core. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "/bin/restic"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "00be78aa-d23d-52b6-8939-07ba72082160": {
                      "mountPath": "/data"
                    }
                  }
                },
                "8c55cf73-af6b-5299-bf5b-8638eec75042": {
                  "name": "backrest",
                  "build": {
                    "builder": "RAILPACK",
                    "dockerfilePath": "shared/round10-gateway/Dockerfile"
                  },
                  "deploy": {
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "orenaksakal/railway-templates",
                    "branch": "codex/unique-template-drafts"
                  },
                  "variables": {
                    "PORT": {
                      "isOptional": false,
                      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
                      "defaultValue": "8080"
                    },
                    "OWNER_AUTH": {
                      "isOptional": false,
                      "description": "Owner auth for backrest. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "true"
                    },
                    "OWNER_SCOPE": {
                      "isOptional": false,
                      "description": "Owner scope for backrest. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "all"
                    },
                    "UPSTREAM_HOST": {
                      "isOptional": false,
                      "description": "Upstream host resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "${{core.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "UPSTREAM_PORT": {
                      "isOptional": false,
                      "description": "Upstream port for backrest. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "9898"
                    },
                    "ACCESS_PASSWORD": {
                      "isOptional": false,
                      "description": "Generated access password. Keep private and preserve with backups.",
                      "defaultValue": "{{ACCESS_PASSWORD}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
                      "defaultValue": "shared/round10-gateway/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "backrest",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-19T10:14:38.021Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-19T08:27:55.307Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_12d80c34a76847299a9c",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 82,
    "typical_build_seconds": 12,
    "typical_start_seconds": 10,
    "slowest_service": "backrest"
  }
}
