Explorar o código

Merge remote-tracking branch 'leszek/tests-giza-setup-new-chain' into tests-giza-setup-new-chain

Mokhtar Naamani %!s(int64=3) %!d(string=hai) anos
pai
achega
8d1f42b7a4
Modificáronse 3 ficheiros con 15 adicións e 14 borrados
  1. 9 9
      .env
  2. 5 4
      docker-compose.yml
  3. 1 1
      query-node/package.json

+ 9 - 9
.env

@@ -9,7 +9,7 @@ INDEXER_DB_NAME=query_node_indexer
 DB_NAME=query_node_processor
 DB_USER=postgres
 DB_PASS=postgres
-DB_HOST=localhost
+DB_HOST=db
 DB_PORT=5432
 DEBUG=index-builder:*
 TYPEORM_LOGGING=error
@@ -19,14 +19,14 @@ TYPEORM_LOGGING=error
 # Note, that if there are already some indexed events, this setting is ignored
 BLOCK_HEIGHT=0
 
-# GraphQL ports (WARTHOG_APP_HOST overrides GRAPHQL_SERVER_PORT)
-# So keep them the safe to avoid confusion, as long as each service is
-# run in a separate container on same host then there is no issue.
-# It does not make sense to have both but hydra codegen demands them.
-GRAPHQL_SERVER_PORT=4001
+# Query node GraphQL server port
+GRAPHQL_SERVER_PORT=8081
+
+# Hydra indexer gateway GraphQL server port
+HYDRA_INDEXER_GATEWAY_PORT=4000
+
+# Default GraphQL server host. It is required during "query-node config:dev"
 GRAPHQL_SERVER_HOST=localhost
-WARTHOG_APP_PORT=${GRAPHQL_SERVER_PORT}
-WARTHOG_APP_HOST=localhost
 
 # Websocket RPC endpoint containers will use.
 JOYSTREAM_NODE_WS=ws://joystream-node:9944/
@@ -39,7 +39,7 @@ COLOSSUS_QUERY_NODE_HOST=graphql-server:${GRAPHQL_SERVER_PORT}
 DISTRIBUTOR_QUERY_NODE_URL=http://graphql-server:${GRAPHQL_SERVER_PORT}/graphql
 
 # Indexer gateway used by processor. If you don't use the local indexer set this to a remote gateway
-PROCESSOR_INDEXER_GATEWAY=http://hydra-indexer-gateway:${GRAPHQL_SERVER_PORT}/graphql
+PROCESSOR_INDEXER_GATEWAY=http://hydra-indexer-gateway:${HYDRA_INDEXER_GATEWAY_PORT}/graphql
 
 # Colossus services identities
 COLOSSUS_1_WORKER_ID=0

+ 5 - 4
docker-compose.yml

@@ -169,8 +169,9 @@ services:
       - .env
     environment:
       - DB_HOST=db
+      - WARTHOG_APP_PORT=${GRAPHQL_SERVER_PORT}
     ports:
-      - '127.0.0.1:8081:${WARTHOG_APP_PORT}'
+      - '127.0.0.1:${GRAPHQL_SERVER_PORT}:${GRAPHQL_SERVER_PORT}'
     depends_on:
       - db
     volumes:
@@ -236,11 +237,11 @@ services:
       - WARTHOG_STARTER_DB_PORT=${DB_PORT}
       - WARTHOG_STARTER_DB_USERNAME=${DB_USER}
       - WARTHOG_STARTER_REDIS_URI=redis://redis:6379/0
-      - WARTHOG_APP_PORT=${WARTHOG_APP_PORT}
-      - PORT=${WARTHOG_APP_PORT}
+      - WARTHOG_APP_PORT=${HYDRA_INDEXER_GATEWAY_PORT}
+      - PORT=${HYDRA_INDEXER_GATEWAY_PORT}
       - DEBUG=*
     ports:
-      - '127.0.0.1:4000:${WARTHOG_APP_PORT}'
+      - '127.0.0.1:${HYDRA_INDEXER_GATEWAY_PORT}:${HYDRA_INDEXER_GATEWAY_PORT}'
     depends_on:
       - db
       - redis

+ 1 - 1
query-node/package.json

@@ -8,7 +8,7 @@
     "lint": "yarn workspace query-node-mappings lint",
     "clean": "rm -rf ./generated",
     "clean:query-node": "rm -rf ./generated/graphql-server",
-    "processor:start": "DEBUG=${DEBUG} hydra-processor run -e ../.env",
+    "processor:start": "DEBUG=${DEBUG} hydra-processor run -e generated/graphql-server/.env",
     "query-node:build": "yarn workspace query-node build",
     "query-node:start:dev": "yarn workspace query-node start:dev",
     "query-node:start:prod": "yarn workspace query-node start:prod",