Skip to main content
Version: 0.2.x

Composites deployment

Valid composites can be deployed to any supporting Ceramic node, by ensuring the model streams described in the composite are available on the node, and that the node is configured to index theses models.

Models deployment

Make sure you have the composedb packages installed, before running the code below.

import { CeramicClient } from '@ceramicnetwork/http-client'
import { readEncodedComposite } from '@composedb/devtools-node'

// Replace by the URL of the Ceramic node you want to deploy the models to
const ceramic = new CeramicClient('http://localhost:7007')

// Replace by the path to the local encoded composite file
const composite = await readEncodedComposite(ceramic, 'my-composite.json')

console.log('Model IDs to set in configuration:', composite.modelIDs)

Ceramic node configuration

The local Ceramic node then needs to be configured to index documents using the models listed in the previous step.

This can be done by editing Ceramic's config file, which defaults to ~/.ceramic/daemon.config.json on Linux, macOS and WSL (Windows Subsystem for Linux), adding the necessary model stream IDs to the indexing.models array:

"indexing": {
"models": ["..."]