{
  "manifest_version": "1.0.0",
  "template": {
    "id": "1c189447-79db-4328-bdca-e6a6994afeb3",
    "slug": "electricsql-or-postgres-sync-engine-data",
    "name": "ElectricSQL | Postgres Sync Engine, Database Included",
    "description": "Electric sync engine + Postgres with logical replication already on.",
    "url": "https://railway.com/deploy/electricsql-or-postgres-sync-engine-data",
    "upstream": {
      "image": "electricsql/electric:1.7.8"
    }
  },
  "status": "unvalidated",
  "validated_at": null,
  "success_rate_30d": null,
  "services": [
    {
      "name": "postgres",
      "source": {
        "image": "postgres:18.4-trixie"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/postgresql",
      "http": false
    },
    {
      "name": "electric",
      "source": {
        "image": "electricsql/electric:1.7.8"
      },
      "needs_volume": true,
      "volume_mount_path": "/var/lib/electric/persistent",
      "http": true
    }
  ],
  "required_inputs": [
    {
      "key": "POSTGRES_PASSWORD",
      "service": "postgres",
      "description": "Provide a value for POSTGRES_PASSWORD.",
      "secret": true,
      "strategy": "generate",
      "generate": "strong_password"
    },
    {
      "key": "DATABASE_URL",
      "service": "electric",
      "description": "Provide a value for DATABASE_URL.",
      "secret": false,
      "strategy": "railway_provided",
      "railway_source": "railway_private_domain"
    },
    {
      "key": "ELECTRIC_SECRET",
      "service": "electric",
      "description": "Provide a value for ELECTRIC_SECRET.",
      "secret": true,
      "strategy": "generate",
      "generate": "random_base64_32"
    }
  ],
  "deploy": {
    "mcp": {
      "server": "railway",
      "tool": "deploy_template",
      "args": {
        "template_code": "electricsql-or-postgres-sync-engine-data"
      }
    },
    "cli": "railway deploy --template electricsql-or-postgres-sync-engine-data",
    "api": {
      "method": "POST",
      "path": "/graphql/v2",
      "body": {
        "query": "mutation templateDeploy($input: TemplateDeployV2Input!) { templateDeployV2(input: $input) { projectId workflowId } }",
        "variables": {
          "input": {
            "templateId": "1c189447-79db-4328-bdca-e6a6994afeb3",
            "serializedConfig": {
              "buckets": {},
              "services": {
                "24714a9a-0adb-4970-a8ff-a5b7c78d3390": {
                  "icon": null,
                  "name": "postgres",
                  "deploy": {
                    "startCommand": "/usr/local/bin/docker-entrypoint.sh postgres -c wal_level=logical -c max_wal_senders=10 -c max_replication_slots=10",
                    "healthcheckPath": null,
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "postgres:18.4-trixie"
                  },
                  "variables": {
                    "POSTGRES_PASSWORD": {
                      "isOptional": false,
                      "defaultValue": "{{POSTGRES_PASSWORD}}"
                    }
                  },
                  "volumeMounts": {
                    "24714a9a-0adb-4970-a8ff-a5b7c78d3390": {
                      "mountPath": "/var/lib/postgresql"
                    }
                  }
                },
                "ac0ce9ab-03dd-433a-bd7e-141135e840b9": {
                  "icon": null,
                  "name": "electric",
                  "deploy": {
                    "startCommand": "/bin/sh -c 'export ELECTRIC_PORT=\"${PORT:-3000}\" ELECTRIC_LISTEN_ON_IPV6=true ELECTRIC_DATABASE_USE_IPV6=true ELECTRIC_STORAGE_DIR=/var/lib/electric/persistent; exec /app/bin/entrypoint start'",
                    "healthcheckPath": "/v1/health",
                    "restartPolicyType": "ON_FAILURE",
                    "restartPolicyMaxRetries": 10
                  },
                  "source": {
                    "image": "electricsql/electric:1.7.8"
                  },
                  "variables": {
                    "DATABASE_URL": {
                      "isOptional": false,
                      "defaultValue": "postgresql://postgres:${{postgres.POSTGRES_PASSWORD}}@${{postgres.RAILWAY_PRIVATE_DOMAIN}}:5432/postgres?sslmode=disable"
                    },
                    "ELECTRIC_SECRET": {
                      "isOptional": false,
                      "defaultValue": "{{ELECTRIC_SECRET}}"
                    }
                  },
                  "networking": {
                    "serviceDomains": {
                      "<hasDomain>": {}
                    }
                  },
                  "volumeMounts": {
                    "ac0ce9ab-03dd-433a-bd7e-141135e840b9": {
                      "mountPath": "/var/lib/electric/persistent"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "post_deploy": {
    "healthcheck": {
      "service": "electric",
      "method": "GET",
      "path": "/v1/health",
      "expect_status": 200
    }
  },
  "resources": {
    "expected_services": 2,
    "needs_volume": true
  },
  "generated_at": "2026-09-08T18:46:46.960Z",
  "generator_version": "0.1.0"
}
