diff --git a/bin/server.js b/bin/server.js index 90382f5..a54a60a 100644 --- a/bin/server.js +++ b/bin/server.js @@ -125,7 +125,9 @@ class Server { console.log('\nConfiguration:') console.log(`Circuit Relay: ${this.config.isCircuitRelay}`) console.log(`IPFS TCP port: ${this.config.ipfsTcpPort}`) - console.log(`IPFS WS port: ${this.config.ipfsWsPort}\n`) + console.log(`IPFS WS port: ${this.config.ipfsWsPort}`) + console.log(`IPFS WebRTC port: ${this.config.ipfsWebRtcPort}`) + console.log(`Connection preference: ${this.config.connectPref}\n`) return app } catch (err) { diff --git a/config/env/common.js b/config/env/common.js index 12e0711..ec766e5 100644 --- a/config/env/common.js +++ b/config/env/common.js @@ -132,6 +132,7 @@ export default { ipfsTcpPort: process.env.IPFS_TCP_PORT ? process.env.IPFS_TCP_PORT : 4101, ipfsWsPort: process.env.IPFS_WS_PORT ? process.env.IPFS_WS_PORT : 4103, ipfsWebRtcPort: process.env.IPFS_WEB_RTC_PORT ? process.env.IPFS_WEB_RTC_PORT : 4105, + connectPref: process.env.CONNECT_PREF, // Used in helia-coord to select connection preference. // Settings for production, using external go-ipfs node. isProduction: process.env.SVC_ENV === 'prod' ? true : false, diff --git a/production/docker/Dockerfile b/production/docker/Dockerfile index ec2255e..a9ae09c 100644 --- a/production/docker/Dockerfile +++ b/production/docker/Dockerfile @@ -66,9 +66,6 @@ RUN npm install # Generate the API docs RUN npm run docs -# Expose the port the API will be served on. -#EXPOSE 5010 - # Start the application. #COPY start-production.sh start-production.sh CMD ["./start-production.sh"] diff --git a/production/docker/docker-compose.yml b/production/docker/docker-compose.yml index 591e029..1f21fef 100644 --- a/production/docker/docker-compose.yml +++ b/production/docker/docker-compose.yml @@ -26,10 +26,12 @@ services: links: - mongo-bch-consumer ports: - - '5015:5015' # : - - '4101:4101' - - '4103:4103' - - '4105:4105' + # : + - '5015:5015' # REST API + - '4101:4101' # TCP + - '4103:4103' # Websockets + - '4105:4105' # WebRTC + volumes: - ../data/ipfsdata:/home/safeuser/ipfs-bch-wallet-consumer/.ipfsdata - ./start-production.sh:/home/safeuser/ipfs-bch-wallet-consumer/start-production.sh diff --git a/production/docker/start-production.sh b/production/docker/start-production.sh index a69e3bc..8c0d040 100755 --- a/production/docker/start-production.sh +++ b/production/docker/start-production.sh @@ -31,6 +31,7 @@ export IPFS_HOST=172.17.0.1 export IPFS_API_PORT=5001 export IPFS_TCP_PORT=4101 export IPFS_WS_PORT=4103 +export IPFS_WEB_RTC_PORT=4105 # Set the debug level for helia-coord. 0-3. # 0 = no debug logs. 3 = maximum debug logs.