diff --git a/bin/server.js b/bin/server.js index 4bd59fd..4a0245a 100644 --- a/bin/server.js +++ b/bin/server.js @@ -94,6 +94,13 @@ class Server { // Attach the other IPFS controllers await controllers.attachControllers(app) + // ipfs-coord has a memory leak. This app shuts down after 8 hours. It + // expects to be run by Docker or pm2, which can automatically restart + // the app. + setTimeout(function () { + process.exit(0) + }, 60000 * 60 * 8) + return app } catch (err) { console.error('Could not start server. Error: ', err) diff --git a/src/adapters/ipfs/ipfs.js b/src/adapters/ipfs/ipfs.js index d6fab04..6cba75e 100644 --- a/src/adapters/ipfs/ipfs.js +++ b/src/adapters/ipfs/ipfs.js @@ -2,6 +2,10 @@ Clean Architecture Adapter for IPFS. This library deals with IPFS so that the apps business logic doesn't need to have any specific knowledge of the js-ipfs library. + + TODO: Add the external IP address to the list of multiaddrs advertised by + this node. See this GitHub Issue for details: + https://github.com/Permissionless-Software-Foundation/ipfs-service-provider/issues/38 */ // Global npm libraries