-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' of https://github.com/desci-labs/nodes into re…
…po-service
- Loading branch information
Showing
16 changed files
with
241 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"anchor": { }, | ||
"http-api": { | ||
"cors-allowed-origins": [ | ||
".*" | ||
], | ||
"admin-dids": [ | ||
"did:key:z6MktbKJrMnhVJ37QFTo12911ycm2juKDUzWHDVETu9s5a9T" | ||
] | ||
}, | ||
"ipfs": { | ||
"mode": "remote", | ||
"host": "http://host.docker.internal:5001" | ||
}, | ||
"logger": { | ||
"log-level": 2 | ||
}, | ||
"metrics": { | ||
"metrics-exporter-enabled": false, | ||
"metrics-port": 9090 | ||
}, | ||
"network": { | ||
"name": "inmemory" | ||
}, | ||
"node": {}, | ||
"state-store": { | ||
"mode": "fs", | ||
"local-directory": "/root/.ceramic/statestore" | ||
}, | ||
"indexing": { | ||
"db": "postgres://walter:white@db_postgres:5432/postgres", | ||
"allow-queries-before-historical-sync": true, | ||
"models": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#! /usr/bin/env bash | ||
|
||
# This script will try to find the `desci-codex` repo and run the | ||
# model deployments. This yields a runtime definition file, which is | ||
# necessary to instantiate the composeDB client used for publishing. | ||
# | ||
# This needs to be re-run when local-data is cleaned, as the models will | ||
# get new streamIDs, and hence the runtime definition file is changed. | ||
# | ||
# There is no damage trying to run this multiple times in a row; it's | ||
# idempotent. | ||
|
||
CTX="[bootstrapCeramic.sh]" | ||
|
||
set -euo pipefail | ||
trap catch ERR | ||
catch() { | ||
echo "$CTX script failed" | ||
exit 1 | ||
} | ||
|
||
# Assert running from repo root | ||
if [[ ! -f .env ]]; then | ||
echo "$CTX Must run from repo root, aborting!" | ||
exit 1 | ||
fi | ||
|
||
# Assert desci-codex repo available | ||
CODEX_REPO_PATH=$(grep "CODEX_REPO_PATH" .env | cut -d"=" -f2) | ||
if [[ -z "$CODEX_REPO_PATH" ]]; then | ||
echo "$CTX CODEX_REPO_PATH not set in .env, aborting!" | ||
exit 1 | ||
else | ||
echo "$CTX Found codex repo path: $CODEX_REPO_PATH" | ||
fi | ||
|
||
# Assert ceramic service is running | ||
RUNNING_SERVICES=$(docker compose --project-name desci ps --services) | ||
if ! grep -q ceramic <<<"$RUNNING_SERVICES"; then | ||
echo "$CTX the ceramic compose service doesn't seem to be running, aborting!" | ||
exit 1 | ||
fi | ||
|
||
# Setup desci-codex and deploy composites | ||
pushd "$CODEX_REPO_PATH" | ||
if [[ ! -d "node_modules" ]]; then | ||
echo "$CTX installing deps desci-codex..." | ||
npm ci | ||
fi | ||
|
||
echo "$CTX deploying composites..." | ||
npm run --workspace packages/composedb deployComposites | ||
popd | ||
|
||
echo "$CTX composites deployed! Copying composite runtime definition to local-data/ceramic..." | ||
cp \ | ||
"$CODEX_REPO_PATH/packages/composedb/src/__generated__/definition.js" \ | ||
local-data/ceramic/definition.js | ||
|
||
echo "$CTX Done! Re-run this script if local state is cleaned." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"printWidth": 120, | ||
"semi": true, | ||
"singleQuote": true, | ||
"trailingComma": "all" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
desci-server/prisma/migrations/20240110092031_add_ceramic_streamid_to_node/migration.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- AlterTable | ||
ALTER TABLE "Node" ADD COLUMN "ceramicStream" TEXT; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.