Browse Source

Update start scripts for new storage node

Anuj Bansal 3 years ago
parent
commit
e630224d74
3 changed files with 26 additions and 19 deletions
  1. 3 3
      build-docker-images.sh
  2. 0 1
      build-npm-packages.sh
  3. 23 15
      start.sh

+ 3 - 3
build-docker-images.sh

@@ -28,10 +28,10 @@ else
   fi
 fi
 
-# Build joystream/apps docker image
-echo "Building 'joystream/apps' docker image..."
+# Build colossus docker image
+echo "Building colossus docker image..."
 docker-compose build colossus
 
 # Build the pioneer docker image
 echo "Building pioneer docker image"
-docker-compose build pioneer
+docker-compose build pioneer

+ 0 - 1
build-npm-packages.sh

@@ -7,6 +7,5 @@ yarn workspace @joystream/types build
 yarn workspace @joystream/metadata-protobuf build
 yarn workspace query-node-root build
 yarn workspace @joystream/cli build
-yarn workspace storage-node build
 yarn workspace storage-node-v2 build
 yarn workspace pioneer build

+ 23 - 15
start.sh

@@ -23,28 +23,36 @@ trap down EXIT
 # Run a local development chain
 docker-compose up -d joystream-node
 
-## Storage Infrastructure
-# Configure a dev storage node and start storage node
-DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
-docker-compose up -d colossus
-# Create a new content directory lead
-yarn workspace api-scripts initialize-content-lead
-
-# Set sudo as the membership screening authority
-yarn workspace api-scripts set-sudo-as-screening-auth
-
 ## Query Node Infrastructure
 # Initialize a new database for the query node infrastructure
 docker-compose up -d db
+
+# Override DB_HOST for db setup
+export DB_HOST=localhost
+
+# Make sure we use dev config for db migrations (prevents "Cannot create database..." and some other errors)
+yarn workspace query-node config:dev
+
+# Migrate the databases
 yarn workspace query-node-root db:prepare
 yarn workspace query-node-root db:migrate
 
-# Startup all query-node infrastructure services
-export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944
-docker-compose up -d graphql-server
-docker-compose up -d processor
+# Set DB_HOST back to docker-service one
+export DB_HOST=db
+
+# Start processor and graphql server
+docker-compose up -d processor-mnt
+docker-compose up -d graphql-server-mnt
+
+## Storage Infrastructure
+docker-compose up -d colossus
+# # Create a new content directory lead
+# yarn workspace api-scripts initialize-content-lead
+
+# # Set sudo as the membership screening authority
+# yarn workspace api-scripts set-sudo-as-screening-auth
 
-docker-compose up -d pioneer
+# docker-compose up -d pioneer
 
 echo "use Ctrl+C to shutdown the development network."