{
  "manifest_version": "1.0.0",
  "template": {
    "id": "a2eee399-4860-4bf4-bdce-a851c50cfa8a",
    "slug": "dbos-durable-webhooks",
    "name": "DBOS Durable Webhooks",
    "description": "Durable webhook processing with PostgreSQL, retries, and recovery.",
    "url": "https://railway.com/deploy/dbos-durable-webhooks",
    "upstream": {
      "repo_url": "https://github.com/orenaksakal/railway-templates"
    }
  },
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "postgres:17@sha256:67f41722b7a8cbdb868a44a4995c846eddfdc2973bccb291ce937dce88ad5675"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql/data",
      "http": false
    },
    {
      "name": "dbos",
      "source": {
        "repo": "https://github.com/orenaksakal/railway-templates"
      },
      "needs_volume": false,
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "PGDATA",
      "service": "postgres",
      "description": "PostgreSQL data directory within the persistent volume. Do not change on an existing database.",
      "secret": false,
      "strategy": "default",
      "default": "/var/lib/postgresql/data/pgdata"
    },
    {
      "key": "POSTGRES_DB",
      "service": "postgres",
      "description": "Initial PostgreSQL database name, or the matching database selected by the application.",
      "secret": false,
      "strategy": "default",
      "default": "dbos"
    },
    {
      "key": "DATABASE_URL",
      "service": "postgres",
      "description": "Private PostgreSQL connection URL assembled from generated credentials and service references. No manual value is needed.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "POSTGRES_USER",
      "service": "postgres",
      "description": "PostgreSQL initialization user, or the matching connection user for the private database.",
      "secret": false,
      "strategy": "default",
      "default": "dbos"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "PostgreSQL password. Generated for the database and referenced by dependent services; keep private.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "PORT",
      "service": "dbos",
      "description": "HTTP port inside this service. Keep the default to match its Railway public port and health check.",
      "secret": false,
      "strategy": "default",
      "default": "3000"
    },
    {
      "key": "API_KEY",
      "service": "dbos",
      "description": "Generated API authentication key, or a reference to the shared internal API key. Keep private and preserve matching references.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "DATABASE_URL",
      "service": "dbos",
      "description": "Private PostgreSQL connection URL assembled from generated credentials and service references. No manual value is needed.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "reference_variable"
    },
    {
      "key": "RAILWAY_DOCKERFILE_PATH",
      "service": "dbos",
      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
      "secret": false,
      "strategy": "default",
      "default": "templates/dbos/Dockerfile"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "dbos-durable-webhooks"
      }
    },
    "cli": "railway deploy --template dbos-durable-webhooks",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "a2eee399-4860-4bf4-bdce-a851c50cfa8a",
            "serializedConfig": {
              "services": {
                "5e00331b-3320-53c8-a892-eb6548f8f14d": {
                  "name": "postgres",
                  "deploy": {
                    "requiredMountPath": "/var/lib/postgresql/data",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:17@sha256:67f41722b7a8cbdb868a44a4995c846eddfdc2973bccb291ce937dce88ad5675"
                  },
                  "variables": {
                    "PGDATA": {
                      "isOptional": false,
                      "description": "PostgreSQL data directory within the persistent volume. Do not change on an existing database.",
                      "defaultValue": "/var/lib/postgresql/data/pgdata"
                    },
                    "POSTGRES_DB": {
                      "isOptional": false,
                      "description": "Initial PostgreSQL database name, or the matching database selected by the application.",
                      "defaultValue": "dbos"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private PostgreSQL connection URL assembled from generated credentials and service references. No manual value is needed.",
                      "defaultValue": "postgresql://dbos:${{postgres.POSTGRES_PASSWORD}}@${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/dbos"
                    },
                    "POSTGRES_USER": {
                      "isOptional": false,
                      "description": "PostgreSQL initialization user, or the matching connection user for the private database.",
                      "defaultValue": "dbos"
                    },
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "description": "PostgreSQL password. Generated for the database and referenced by dependent services; keep private.",
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {}
                  },
                  "volumeMounts": {
                    "fce22db3-b075-5a94-ba1f-d1525bbeaff1": {
                      "mountPath": "/var/lib/postgresql/data"
                    }
                  }
                },
                "e6041018-83b2-5f9e-a010-278919fb6f54": {
                  "name": "dbos",
                  "build": {
                    "builder": "RAILPACK",
                    "dockerfilePath": "templates/dbos/Dockerfile"
                  },
                  "deploy": {
                    "healthcheckPath": "/healthz",
                    "restartPolicyType": "ON_FAILURE",
                    "healthcheckTimeout": 600,
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "repo": "orenaksakal/railway-templates",
                    "branch": "codex/remaining-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": "3000"
                    },
                    "API_KEY": {
                      "isOptional": false,
                      "description": "Generated API authentication key, or a reference to the shared internal API key. Keep private and preserve matching references.",
                      "defaultValue": "{{API_KEY}}"
                    },
                    "DATABASE_URL": {
                      "isOptional": false,
                      "description": "Private PostgreSQL connection URL assembled from generated credentials and service references. No manual value is needed.",
                      "defaultValue": "${{postgres.DATABASE_URL}}"
                    },
                    "RAILWAY_DOCKERFILE_PATH": {
                      "isOptional": false,
                      "description": "Repository-relative Dockerfile used to build this service. Keep the supplied path.",
                      "defaultValue": "templates/dbos/Dockerfile"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:3000": {
                        "port": 3000
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "dbos",
      "method": "GET",
      "path": "/healthz",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T05:54:19.399Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-09-08T06:00:55.949Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_bfb4d83195344c6da67f",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 72,
    "typical_build_seconds": 10,
    "typical_start_seconds": 10,
    "slowest_service": "dbos"
  }
}
