diff --git a/package-lock.json b/package-lock.json index b32a725..979da13 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,12 +9,12 @@ "version": "2.0.0", "license": "MIT", "dependencies": { - "@psf/bch-js": "6.4.1", + "@psf/bch-js": "6.4.5", "axios": "0.27.2", "bcryptjs": "2.4.3", "glob": "7.1.6", "ipfs": "0.62.3", - "ipfs-coord": "8.0.2", + "ipfs-coord": "8.0.4", "ipfs-http-client": "55.0.0", "jsonrpc-lite": "2.2.0", "jsonwebtoken": "8.5.1", @@ -1487,10 +1487,9 @@ "license": "BSD-3-Clause" }, "node_modules/@psf/bch-js": { - "version": "6.4.1", - "resolved": "http://94.130.170.209:4873/@psf%2fbch-js/-/bch-js-6.4.1.tgz", - "integrity": "sha512-/BLGzWH02VqaDNeY05QGMhrCtYDw5bXn45Egz+L5FLcyZaOqONR4kl80T6a8xvTPcREO4R+AjGTRBpfjdikwpA==", - "license": "MIT", + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-6.4.5.tgz", + "integrity": "sha512-sH72zbJJI5oe9EUMczFQb0jCaNQb8rc3/86E6xXKl3325HCwBqE80BX7JFvZ97Qv1gGxwp/3WROp59v6Dz2NKA==", "dependencies": { "@chris.troutner/bip32-utils": "1.0.5", "@psf/bip21": "2.0.1", @@ -8440,10 +8439,9 @@ } }, "node_modules/ipfs-coord": { - "version": "8.0.2", - "resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-8.0.2.tgz", - "integrity": "sha512-CdUH4GLLFArUDb8LIRAXxPlhbRQ44A5PEWB4J9zzDB3by93O7DLEgjqPqLDolalzrtiQBVzoARO/exZvdxBF+w==", - "license": "MIT", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-8.0.4.tgz", + "integrity": "sha512-jwZsrDlEWSHMnAde8PdyUScTzRlTCIvPAziChoczj5ZOZJIUbxLNkGphBI0xDj2G/LzjPrU1Ko/QZrU+oLFUnw==", "dependencies": { "axios": "0.21.4", "bch-encrypt-lib": "2.0.0", @@ -22622,9 +22620,9 @@ "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" }, "@psf/bch-js": { - "version": "6.4.1", - "resolved": "http://94.130.170.209:4873/@psf%2fbch-js/-/bch-js-6.4.1.tgz", - "integrity": "sha512-/BLGzWH02VqaDNeY05QGMhrCtYDw5bXn45Egz+L5FLcyZaOqONR4kl80T6a8xvTPcREO4R+AjGTRBpfjdikwpA==", + "version": "6.4.5", + "resolved": "https://registry.npmjs.org/@psf/bch-js/-/bch-js-6.4.5.tgz", + "integrity": "sha512-sH72zbJJI5oe9EUMczFQb0jCaNQb8rc3/86E6xXKl3325HCwBqE80BX7JFvZ97Qv1gGxwp/3WROp59v6Dz2NKA==", "requires": { "@chris.troutner/bip32-utils": "1.0.5", "@psf/bip21": "2.0.1", @@ -27780,9 +27778,9 @@ } }, "ipfs-coord": { - "version": "8.0.2", - "resolved": "http://94.130.170.209:4873/ipfs-coord/-/ipfs-coord-8.0.2.tgz", - "integrity": "sha512-CdUH4GLLFArUDb8LIRAXxPlhbRQ44A5PEWB4J9zzDB3by93O7DLEgjqPqLDolalzrtiQBVzoARO/exZvdxBF+w==", + "version": "8.0.4", + "resolved": "https://registry.npmjs.org/ipfs-coord/-/ipfs-coord-8.0.4.tgz", + "integrity": "sha512-jwZsrDlEWSHMnAde8PdyUScTzRlTCIvPAziChoczj5ZOZJIUbxLNkGphBI0xDj2G/LzjPrU1Ko/QZrU+oLFUnw==", "requires": { "axios": "0.21.4", "bch-encrypt-lib": "2.0.0", diff --git a/package.json b/package.json index 0d340b2..85a49ee 100644 --- a/package.json +++ b/package.json @@ -23,12 +23,12 @@ }, "repository": "Permissionless-Software-Foundation/ipfs-service-provider", "dependencies": { - "@psf/bch-js": "6.4.1", + "@psf/bch-js": "6.4.5", "axios": "0.27.2", "bcryptjs": "2.4.3", "glob": "7.1.6", "ipfs": "0.62.3", - "ipfs-coord": "8.0.2", + "ipfs-coord": "8.0.4", "ipfs-http-client": "55.0.0", "jsonrpc-lite": "2.2.0", "jsonwebtoken": "8.5.1", diff --git a/production/docker/docker-compose.yml b/production/docker/docker-compose.yml index fdada55..22310fe 100644 --- a/production/docker/docker-compose.yml +++ b/production/docker/docker-compose.yml @@ -4,7 +4,7 @@ version: '3.9' services: mongo-ipfs-service: - image: mongo + image: mongo:4.2.0 container_name: mongo-ipfs-service ports: - '5555:27017' # : @@ -14,7 +14,7 @@ services: restart: always ipfs: - image: ipfs/go-ipfs:v0.12.0 + image: ipfs/go-ipfs:v0.14.0 container_name: ipfs environment: MY_ENV_VAR: 'placeholder' @@ -26,11 +26,12 @@ services: mem_limit: 2000mb ports: - 4001:4001 + - 4003:4003 - 172.17.0.1:5001:5001 - 172.17.0.1:8080:8080 volumes: - ../data/go-ipfs/data:/data/ipfs - - ../../swarm.key:/data/ipfs/swarm.key + # - ../../swarm.key:/data/ipfs/swarm.key # https://docs.docker.com/compose/compose-file/compose-file-v3/#command # https://github.com/ipfs/go-ipfs/blob/91c52657166bcf86f2476926e4fe56694dc26562/Dockerfile#L115 command: diff --git a/src/adapters/ipfs/index.js b/src/adapters/ipfs/index.js index 13050d1..f150c3f 100644 --- a/src/adapters/ipfs/index.js +++ b/src/adapters/ipfs/index.js @@ -5,6 +5,7 @@ // Local libraries const IpfsAdapter = require('./ipfs') const IpfsCoordAdapter = require('./ipfs-coord') +const config = require('../../../config') class IPFS { constructor (localConfig = {}) { @@ -12,6 +13,7 @@ class IPFS { this.ipfsAdapter = new IpfsAdapter() this.IpfsCoordAdapter = IpfsCoordAdapter this.process = process + this.config = config this.ipfsCoordAdapter = {} // placeholder @@ -32,7 +34,9 @@ class IPFS { // Start ipfs-coord this.ipfsCoordAdapter = new this.IpfsCoordAdapter({ - ipfs: this.ipfs + ipfs: this.ipfs, + tcpPort: this.config.ipfsTcpPort, + wsPort: this.config.ipfsWsPort }) await this.ipfsCoordAdapter.start() console.log('ipfs-coord is ready.')