{
  "manifest_version": "1.0.0",
  "template": {
    "id": "163f62e0-a459-4878-9948-52b66889c4ef",
    "slug": "zero-sync-or-just-updated-realtime-sync-",
    "name": "Zero Sync | (Just Updated) Realtime Sync Engine for Postgres, Secrets Generated",
    "description": "Zero sync engine plus Postgres, logical replication and secrets generated",
    "url": "https://railway.com/deploy/zero-sync-or-just-updated-realtime-sync-",
    "upstream": {
      "image": "rocicorp/zero@sha256:893c4a78a1a84f1ab8d7e76263b4bab3c8aee61101b00b365756c47e328935a2"
    }
  },
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "postgres:18.6@sha256:74935e72241653ca55e0414067e6d8763aceb8a810eb51b452253ec3dcfc4336"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    },
    {
      "name": "zero-cache",
      "source": {
        "image": "rocicorp/zero@sha256:893c4a78a1a84f1ab8d7e76263b4bab3c8aee61101b00b365756c47e328935a2"
      },
      "needs_volume": true,
      "volume_mount_path": "/data",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "ZERO_UPSTREAM_DB",
      "service": "zero-cache",
      "description": "Provide a value for ZERO_UPSTREAM_DB.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ZERO_ADMIN_PASSWORD",
      "service": "zero-cache",
      "description": "Provide a value for ZERO_ADMIN_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "zero-sync-or-just-updated-realtime-sync-"
      }
    },
    "cli": "railway deploy --template zero-sync-or-just-updated-realtime-sync-",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "163f62e0-a459-4878-9948-52b66889c4ef",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "420bd7a9-5464-49ba-b2cc-93e4256be9ad": {
                  "icon": null,
                  "name": "postgres",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'printf \"CREATE 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);\\n\" > /docker-entrypoint-initdb.d/00-zero.sql; exec docker-entrypoint.sh postgres -c wal_level=logical -c max_wal_senders=20 -c max_replication_slots=20'",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:18.6@sha256:74935e72241653ca55e0414067e6d8763aceb8a810eb51b452253ec3dcfc4336"
                  },
                  "variables": {
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "420bd7a9-5464-49ba-b2cc-93e4256be9ad": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                },
                "f91ee819-7631-4033-85fa-65c982ffe404": {
                  "icon": null,
                  "name": "zero-cache",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'export ZERO_PORT=$PORT ZERO_REPLICA_FILE=/data/replica.db ZERO_ENABLE_CRUD_MUTATIONS=true ZERO_ALLOW_LEGACY_QUERIES=true; exec zero-cache'",
                    "healthcheckPath": "/keepalive",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "rocicorp/zero@sha256:893c4a78a1a84f1ab8d7e76263b4bab3c8aee61101b00b365756c47e328935a2"
                  },
                  "variables": {
                    "ZERO_UPSTREAM_DB": {
                      "isOptional": false,
                      "defaultValue": "postgres://postgres:${{postgres.POSTGRES_PASSWORD}}@${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/postgres?sslmode=disable"
                    },
                    "ZERO_ADMIN_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{ZERO_ADMIN_PASSWORD}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>:8080": {
                        "port": 8080
                      }
                    }
                  },
                  "volumeMounts": {
                    "f91ee819-7631-4033-85fa-65c982ffe404": {
                      "mountPath": "/data"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "zero-cache",
      "method": "GET",
      "path": "/keepalive",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-10-17T16:14:42.276Z",
  "generator_version": "0.1.0",
  "status": "degraded",
  "validated_at": "2026-10-17T15:28:44.861Z",
  "success_rate_30d": 0,
  "validation": {
    "last_run_id": "run_eaf1485c0542439bb171",
    "checks": [
      {
        "name": "workflow_completed",
        "passed": true
      },
      {
        "name": "all_services_deployed",
        "passed": false,
        "detail": "FAILED,SUCCESS"
      }
    ]
  }
}
