{
  "manifest_version": "1.0.0",
  "template": {
    "id": "58c2d6b9-05bd-45bc-aced-f91d972709f1",
    "slug": "postgrest-or-just-updated-rest-api-for-p",
    "name": "PostgREST | (Just Updated) REST API for Postgres, JWT Secret Generated, Data Survives Redeploys",
    "description": "REST API for Postgres with JWT auth. Secrets generated, data persists.",
    "url": "https://railway.com/deploy/postgrest-or-just-updated-rest-api-for-p",
    "upstream": {
      "image": "ghcr.io/bon5co/postgrest-railway@sha256:730411893fa046656d656ca8e3300bbe45948b2f96ed5ac116089105162f3507"
    }
  },
  "services": [
    {
      "name": "postgrest",
      "source": {
        "image": "ghcr.io/bon5co/postgrest-railway@sha256:730411893fa046656d656ca8e3300bbe45948b2f96ed5ac116089105162f3507"
      },
      "needs_volume": false,
      "http": true
    },
    {
      "name": "postgres",
      "source": {
        "image": "postgres:18.6@sha256:74935e72241653ca55e0414067e6d8763aceb8a810eb51b452253ec3dcfc4336"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    }
  ],
  "required_inputs": [
    {
      "key": "PGRST_DB_URI",
      "service": "postgrest",
      "description": "Provide a value for PGRST_DB_URI.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "PGRST_JWT_SECRET",
      "service": "postgrest",
      "description": "Provide a value for PGRST_JWT_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    },
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "postgrest-or-just-updated-rest-api-for-p"
      }
    },
    "cli": "railway deploy --template postgrest-or-just-updated-rest-api-for-p",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "58c2d6b9-05bd-45bc-aced-f91d972709f1",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "9b59ad44-8417-4a9f-988d-9cb8df917e73": {
                  "icon": null,
                  "name": "postgrest",
                  "deploy": {
                    "startCommand": null,
                    "healthcheckPath": "/",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "ghcr.io/bon5co/postgrest-railway@sha256:730411893fa046656d656ca8e3300bbe45948b2f96ed5ac116089105162f3507"
                  },
                  "variables": {
                    "PGRST_DB_URI": {
                      "isOptional": false,
                      "defaultValue": "postgres://postgres:${{postgres.POSTGRES_PASSWORD}}@${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/postgres?sslmode=disable"
                    },
                    "PGRST_JWT_SECRET": {
                      "isOptional": false,
                      "defaultValue": "{{PGRST_JWT_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  }
                },
                "d1a0cb26-4db2-484a-ad6c-a1a0566cb8f7": {
                  "icon": null,
                  "name": "postgres",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'printf \"CREATE ROLE anon NOLOGIN;\\nCREATE ROLE authenticated NOLOGIN;\\nGRANT anon, authenticated TO postgres;\\nCREATE TABLE IF NOT EXISTS public.todos (id serial PRIMARY KEY, task text NOT NULL, done boolean NOT NULL DEFAULT false);\\nINSERT INTO public.todos (task) SELECT chr(104)||chr(101)||chr(108)||chr(108)||chr(111);\\nGRANT USAGE ON SCHEMA public TO anon, authenticated;\\nGRANT SELECT ON public.todos TO anon;\\nGRANT ALL ON public.todos TO authenticated;\\nGRANT USAGE, SELECT ON SEQUENCE public.todos_id_seq TO authenticated;\\n\" > /docker-entrypoint-initdb.d/00-postgrest.sql; exec docker-entrypoint.sh postgres'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:18.6@sha256:74935e72241653ca55e0414067e6d8763aceb8a810eb51b452253ec3dcfc4336"
                  },
                  "variables": {
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "d1a0cb26-4db2-484a-ad6c-a1a0566cb8f7": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "postgrest",
      "method": "GET",
      "path": "/",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-30T04:14:55.026Z",
  "generator_version": "0.1.0",
  "status": "validated",
  "validated_at": "2026-10-18T19:35:28.390Z",
  "success_rate_30d": 1,
  "validation": {
    "last_run_id": "run_c51dbb629ca14c618bc6",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": true
      },
      {
        "name": "healthcheck",
        "passed": true
      },
      {
        "name": "stays_up",
        "passed": true
      }
    ],
    "typical_ready_seconds": 27,
    "typical_build_seconds": 0,
    "typical_start_seconds": 10,
    "slowest_service": "postgrest"
  }
}
