diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 29aef6d6..deaf8acf 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -66,6 +66,6 @@ jobs: file: Dockerfile.hyperswarm push: true tags: | - ${{ env.REGISTRY }}/keychainmdip/hyperswarm-monitor:${{ steps.calver.outputs.version }} - ${{ env.REGISTRY }}/keychainmdip/hyperswarm-monitor:release + ${{ env.REGISTRY }}/keychainmdip/hyperswarm-mediator:${{ steps.calver.outputs.version }} + ${{ env.REGISTRY }}/keychainmdip/hyperswarm-mediator:release labels: ${{ steps.meta.outputs.labels }} diff --git a/Dockerfile.hyperswarm b/Dockerfile.hyperswarm index c09bfd6c..7005d893 100644 --- a/Dockerfile.hyperswarm +++ b/Dockerfile.hyperswarm @@ -14,4 +14,4 @@ RUN npm ci COPY *.js ./ # Run... -CMD ["node", "hyperswarm-monitor.js"] +CMD ["node", "hyperswarm-mediator.js"] diff --git a/README.md b/README.md index cbb55872..c6482e28 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ $ npm install Start the services in separate terminals: ``` node server.js -node hyperswarm-monitor.js +node hyperswarm-mediator.js ``` OR diff --git a/docker-compose.yml b/docker-compose.yml index 9de0be9a..b445b0c3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,7 +13,7 @@ services: build: context: . dockerfile: Dockerfile.hyperswarm - image: macterra/hyperswarm-monitor + image: macterra/hyperswarm-mediator environment: - GATEKEEPER_URL=http://gatekeeper:3000 volumes: diff --git a/hyperswarm-monitor.js b/hyperswarm-mediator.js similarity index 98% rename from hyperswarm-monitor.js rename to hyperswarm-mediator.js index 6a6d624e..383d3cc3 100644 --- a/hyperswarm-monitor.js +++ b/hyperswarm-mediator.js @@ -7,6 +7,7 @@ import asyncLib from 'async'; import * as gatekeeper from './gatekeeper-sdk.js'; import * as cipher from './cipher.js'; +import config from './config.js'; import { EventEmitter } from 'events'; EventEmitter.defaultMaxListeners = 100; @@ -193,7 +194,7 @@ const discovery = swarm.join(topic, { client: true, server: true }); // The flushed promise will resolve when the topic has been fully announced to the DHT discovery.flushed().then(() => { - console.log(`connecting to gatekeeper at ${gatekeeper.URL}`); + console.log(`connecting to gatekeeper at ${config.gatekeeperURL}`); console.log(`hyperswarm peer id: ${peerName}`); console.log('joined topic:', b4a.toString(topic, 'hex')); });