Skip to content

Commit

Permalink
Merge pull request #1 from BootNodeDev/feature/CirclesUBI#25-host-new…
Browse files Browse the repository at this point in the history
…-subgraph

feature: deploy subgraph in a hosted service
  • Loading branch information
LaimeJesus authored May 31, 2022
2 parents 9ddf124 + 5a45198 commit b13e40b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"codegen": "./scripts/codegen.sh",
"create": "./scripts/create.sh",
"deploy": "./scripts/deploy.sh",
"hosted-service-deploy": "./scripts/hosted_service_deploy.sh",
"start": "npm run codegen && npm run build && npm run create && npm run deploy",
"prepare:xdai": "cp .env-xdai .env",
"prepare:poa-sokol": "cp .env-poa-sokol .env"
Expand Down
22 changes: 22 additions & 0 deletions scripts/hosted_service_deploy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash
set -e

source "./scripts/common.sh"

# Export environment variables
export_env $1

# Export subgraph version from package.json
get_version

# Prepare manifest
build_manifest

# Auth
exec_graph auth "--product hosted-service"

# Deploy graph
exec_graph deploy "--product hosted-service $SUBGRAPH_NAME --version-label $SUBGRAPH_VERSION"

# Cleanup
clear_manifest

0 comments on commit b13e40b

Please sign in to comment.