diff --git a/Dockerfile b/Dockerfile index 27d45a4938..14295e16f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/Dockerfile.development b/Dockerfile.development index 784df856c6..07124a0c6b 100644 --- a/Dockerfile.development +++ b/Dockerfile.development @@ -5,6 +5,7 @@ LABEL maintainer="OriginTrail" ARG targetEnvironment=development ENV NODE_ENV=$targetEnvironment +ENV GRANAX_USE_SYSTEM_TOR=1 RUN apt-get -qq update && apt-get -qq -y install curl RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - @@ -23,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/Dockerfile.mariner b/Dockerfile.mariner index a7cda29a34..2e9c373a50 100644 --- a/Dockerfile.mariner +++ b/Dockerfile.mariner @@ -24,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/Dockerfile.stable b/Dockerfile.stable index 7520ca90bb..fc379ace01 100644 --- a/Dockerfile.stable +++ b/Dockerfile.stable @@ -5,6 +5,7 @@ LABEL maintainer="OriginTrail" ARG targetEnvironment=stable ENV NODE_ENV=$targetEnvironment +ENV GRANAX_USE_SYSTEM_TOR=1 RUN apt-get -qq update && apt-get -qq -y install curl RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - @@ -23,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/Dockerfile.staging b/Dockerfile.staging index 4bb8cf0a70..f08591387a 100644 --- a/Dockerfile.staging +++ b/Dockerfile.staging @@ -5,6 +5,7 @@ LABEL maintainer="OriginTrail" ARG targetEnvironment=staging ENV NODE_ENV=$targetEnvironment +ENV GRANAX_USE_SYSTEM_TOR=1 RUN apt-get -qq update && apt-get -qq -y install curl RUN curl -sL https://deb.nodesource.com/setup_9.x | bash - @@ -23,7 +24,6 @@ COPY testnet/supervisord.conf /etc/supervisor/conf.d/supervisord.conf # Add files COPY . /ot-node -RUN echo '{ "database": { "password": "root" }}' > /ot-node/.origintrail_noderc RUN service arangodb3 start && cd /ot-node && npm install && npm run setup -- --configDir=/ot-node/data RUN wget https://github.com/papertrail/remote_syslog2/releases/download/v0.20/remote_syslog_linux_amd64.tar.gz diff --git a/config/config.json b/config/config.json index 204da9c9b0..68472ae3ca 100644 --- a/config/config.json +++ b/config/config.json @@ -44,7 +44,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail-develop", "host": "localhost", @@ -144,7 +144,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail-staging", "host": "localhost", @@ -244,7 +244,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail-stable", "host": "localhost", @@ -344,7 +344,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail", "host": "localhost", @@ -447,7 +447,7 @@ "database": { "provider": "arangodb", "username": "root", - "password": "", + "password": "root", "port": 8529, "database": "origintrail", "host": "localhost", diff --git a/package-lock.json b/package-lock.json index b2ff2be398..4def57b8c4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "2.0.23", + "version": "2.0.24", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d666143aea..a9e01fcfd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "origintrail_node", - "version": "2.0.23", + "version": "2.0.24", "description": "OriginTrail node", "main": ".eslintrc.js", "config": { diff --git a/testnet/register-node.js b/testnet/register-node.js index ffa4c63114..ea32a726bd 100644 --- a/testnet/register-node.js +++ b/testnet/register-node.js @@ -35,14 +35,22 @@ function main() { externalConfig = JSON.parse(fs.readFileSync(localConfigPath, 'utf8')); } - if (!process.env.NODE_WALLET || !process.env.NODE_PRIVATE_KEY || - !web3.utils.isAddress(process.env.NODE_WALLET)) { - console.error('Wallet not provided! Please provide valid wallet.'); - } else { + // Check for old env variables for the sake of compatibility. + if (process.env.NODE_WALLET) { externalConfig.node_wallet = process.env.NODE_WALLET; + } + if (process.env.NODE_PRIVATE_KEY) { externalConfig.node_private_key = process.env.NODE_PRIVATE_KEY; } + if (!externalConfig.node_wallet || + !externalConfig.node_private_key || + !web3.utils.isAddress(externalConfig.node_wallet)) { + console.error('Wallet not provided! Please provide valid wallet.'); + process.exit(1); + return; + } + if (process.env.ERC_725_IDENTITY) { const erc725IdentityFilePath = path.join(localConfiguration.appDataPath, localConfiguration.erc725_identity_filepath);