diff --git a/config/env/common.js b/config/env/common.js index c1aca4f..1f2e65f 100644 --- a/config/env/common.js +++ b/config/env/common.js @@ -89,7 +89,7 @@ export default { debugLevel: process.env.DEBUG_LEVEL ? parseInt(process.env.DEBUG_LEVEL) : 2, // Settings for production, using external go-ipfs node. - isProduction: process.env.SVC_ENV === 'production' ? true : false, + isProduction: process.env.SVC_ENV === 'prod' ? true : false, ipfsHost: process.env.IPFS_HOST ? process.env.IPFS_HOST : 'localhost', ipfsApiPort: process.env.IPFS_API_PORT ? parseInt(process.env.IPFS_API_PORT) diff --git a/production/docker/Dockerfile b/production/docker/Dockerfile index 7766679..5ee12e5 100644 --- a/production/docker/Dockerfile +++ b/production/docker/Dockerfile @@ -34,7 +34,7 @@ WORKDIR /home/safeuser # Update to the latest version of npm. #RUN npm install -g npm@7.23.0 -RUN npm install -g npm +#RUN npm install -g npm # npm mirror to prevent direct dependency on npm. RUN npm set registry http://94.130.170.209:4873/ diff --git a/production/docker/docker-compose.yml b/production/docker/docker-compose.yml index 4727adf..edce087 100644 --- a/production/docker/docker-compose.yml +++ b/production/docker/docker-compose.yml @@ -13,38 +13,9 @@ services: command: mongod --logpath=/dev/null # -- quiet restart: always - ipfs: - # https://github.com/christroutner/trickle-ipfs - image: christroutner/trickle-ipfs:v1.0.1 - #build: - # context: ./ - # dockerfile: Dockerfile - container_name: ipfs - environment: - IPFS_DAEMON_ARGUMENTS: '--enable-pubsub-experiment --migrate=true --agent-version-suffix=docker --routing=dhtclient' - UPLOAD_KBPS: '1000' - DOWNLOAD_KBPS: '1000' - logging: - driver: 'json-file' - options: - max-size: '10m' - max-file: '10' - mem_limit: 2000mb - ports: - - 4001:4001 - - 4003:4003 - - 172.17.0.1:5001:5001 - - 172.17.0.1:8080:8080 - command: [ - './start-ipfs.sh' - ] - volumes: - - ../data/go-ipfs/data:/root/.ipfs - restart: always - ipfs-service: #build: . - image: christroutner/ipfs-service-provider:v2.2.13 + image: christroutner/ipfs-service-provider:v5.0.1 container_name: ipfs-service logging: driver: 'json-file' @@ -54,7 +25,6 @@ services: mem_limit: 500mb links: - mongo-ipfs-service - - ipfs ports: - '5010:5010' # : volumes: diff --git a/production/docker/start-production.sh b/production/docker/start-production.sh index 4303889..5535a3e 100755 --- a/production/docker/start-production.sh +++ b/production/docker/start-production.sh @@ -29,10 +29,14 @@ export DBURL=mongodb://172.17.0.1:5555/ipfs-service-prod export PORT=5010 # Production settings using external go-ipfs node. -export SVC_ENV=production +export SVC_ENV=prod export IPFS_HOST=172.17.0.1 export IPFS_API_PORT=5001 export IPFS_TCP_PORT=4001 export IPFS_WS_PORT=4003 +# Set the debug level for helia-coord. 0-3. +# 0 = no debug logs. 3 = maximum debug logs. +export DEBUG_LEVEL=0 + npm start