{
  "manifest_version": "1.0.0",
  "template": {
    "id": "6c184bac-91b5-4822-99b1-d8af23b008f2",
    "slug": "automad-cms-v2",
    "name": "Automad CMS v2",
    "description": "Flat-file visual CMS with a persistent site and a protected editor setup.",
    "url": "https://railway.com/deploy/automad-cms-v2",
    "upstream": {
      "repo_url": "https://github.com/orenaksakal/railway-templates"
    }
  },
  "services": [
    {
      "name": "automad",
      "source": {
        "repo": "https://github.com/orenaksakal/railway-templates"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "app",
      "source": {
        "image": "automad/automad:v2@sha256:5af9d80ae307fa2cc5afa504adfa66f3cfc8c6967cb00a1ac2e5f4b5cb88042d"
      },
      "needs_volume": true,
      "volume_mount_path": "/app",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PORT",
      "service": "automad",
      "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": "automad",
      "description": "Require owner authentication for every application route.",
      "secret": false,
      "strategy": "default",
      "default": "true"
    },
    {
      "key": "OWNER_SCOPE",
      "service": "automad",
      "description": "Protect all application routes.",
      "secret": false,
      "strategy": "default",
      "default": "all"
    },
    {
      "key": "UPSTREAM_HOST",
      "service": "automad",
      "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": "automad",
      "description": "Upstream port for automad. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
      "secret": false,
      "strategy": "default",
      "default": "80"
    },
    {
      "key": "ACCESS_PASSWORD",
      "service": "automad",
      "description": "Generated access password. Keep private and preserve with backups.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "automad",
      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
      "secret": false,
      "strategy": "default",
      "default": "shared/round6-gateway/Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "automad-cms-v2"
      }
    },
    "cli": "railway deploy --template automad-cms-v2",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "6c184bac-91b5-4822-99b1-d8af23b008f2",
            "serializedConfig": {
              "services": {
                "7da8d417-d674-55e4-abf3-e16eb56cbb50": {
                  "name": "automad",
                  "build": {
                    "builder": "RAILPACK",
                    "dockerfilePath": "shared/round6-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": "Require owner authentication for every application route.",
                      "defaultValue": "true"
                    },
                    "OWNER_SCOPE": {
                      "isOptional": false,
                      "description": "Protect all application routes.",
                      "defaultValue": "all"
                    },
                    "UPSTREAM_HOST": {
                      "isOptional": false,
                      "description": "Upstream host resolved automatically from the linked service. Keep this reference when using the included topology.",
                      "defaultValue": "${{app.RAILWAY_PRIVATE_DOMAIN}}"
                    },
                    "UPSTREAM_PORT": {
                      "isOptional": false,
                      "description": "Upstream port for automad. The supplied value follows the pinned upstream deployment; change only with its configuration guide.",
                      "defaultValue": "80"
                    },
                    "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/round6-gateway/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {}
                },
                "a9413273-2286-5229-abcc-df16905200ef": {
                  "name": "app",
                  "deploy": {
                    "requiredMountPath": "/app",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "automad/automad:v2@sha256:5af9d80ae307fa2cc5afa504adfa66f3cfc8c6967cb00a1ac2e5f4b5cb88042d"
                  },
                  "variables": {},
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "9f33a1f3-a4e7-5ee8-8db6-72ca65a8978c": {
                      "mountPath": "/app"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "automad",
      "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": "degraded",
  "validated_at": "2026-09-19T07:55:14.020Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_402938ed457847e39cba",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "BUILDING,CRASHED"
      }
    ]
  }
}
