mirror of
https://github.com/Permissionless-Software-Foundation/ipfs-bch-wallet-consumer.git
synced 2026-09-21 16:52:03 -07:00
Merge pull request #96 from Permissionless-Software-Foundation/ct-unstable
Configuring ports with env vars
This commit is contained in:
Generated
+14
-16
@@ -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",
|
||||
|
||||
+2
-2
@@ -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",
|
||||
|
||||
@@ -69,7 +69,7 @@ VOLUME /home/safeuser/keys
|
||||
EXPOSE 5010
|
||||
|
||||
# Start the application.
|
||||
COPY start-production.sh start-production.sh
|
||||
#COPY start-production.sh start-production.sh
|
||||
CMD ["./start-production.sh"]
|
||||
|
||||
#CMD ["npm", "start"]
|
||||
|
||||
@@ -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' # <host port>:<container port>
|
||||
@@ -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:
|
||||
@@ -43,8 +44,8 @@ services:
|
||||
restart: always
|
||||
|
||||
ipfs-service:
|
||||
#build: .
|
||||
image: christroutner/ipfs-service-provider:v2.2.1
|
||||
build: .
|
||||
#image: christroutner/ipfs-service-provider:v2.2.1
|
||||
container_name: ipfs-service
|
||||
logging:
|
||||
driver: 'json-file'
|
||||
@@ -59,4 +60,5 @@ services:
|
||||
- '5010:5010' # <host port>:<container port>
|
||||
volumes:
|
||||
- ../data/ipfsdata:/home/safeuser/ipfs-service-provider/.ipfsdata
|
||||
- ./start-production.sh:/home/safeuser/ipfs-service-provider/start-production.sh
|
||||
restart: always
|
||||
|
||||
@@ -33,6 +33,6 @@ export SVC_ENV=production
|
||||
export IPFS_HOST=172.17.0.1
|
||||
export IPFS_API_PORT=5001
|
||||
export IPFS_TCP_PORT=4001
|
||||
#export IPFS_WS_PORT=5269
|
||||
export IPFS_WS_PORT=4003
|
||||
|
||||
npm start
|
||||
|
||||
@@ -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.')
|
||||
|
||||
Reference in New Issue
Block a user