diff --git a/Dockerfile b/Dockerfile index 7f557eb..b6dfaf5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,7 @@ ENV NODE_PATH $NVM_DIR/v$NODE_VERSION/lib/node_modules ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH RUN adduser --disabled-password futurebit +RUN grep -qxF 'futurebit ALL=(ALL) NOPASSWD:ALL' /etc/sudoers || echo 'futurebit ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers RUN mkdir -p /opt/apolloapi RUN chown -R futurebit /opt diff --git a/backend/install b/backend/install index 66a7f22..cf1a009 100755 --- a/backend/install +++ b/backend/install @@ -94,6 +94,9 @@ arch=$(uname -m) cp $APOLLO_DIR/backend/apollo-miner/bin/$arch/apollo-miner $APOLLO_DIR/backend/apollo-miner/futurebit-miner +### Bitcoind ### +cp $APOLLO_DIR/backend/node/bin/$arch/bitcoind $APOLLO_DIR/backend/node/bitcoind + ### TOR ### usermod -a -G debian-tor futurebit cp $APOLLO_DIR/backend/torrc /etc/tor/torrc diff --git a/backend/node/bitcoin.conf b/backend/node/bitcoin.conf index 37ce7c9..c16170f 100755 --- a/backend/node/bitcoin.conf +++ b/backend/node/bitcoin.conf @@ -1,11 +1,7 @@ -# makes client run in background server=1 rpcuser=futurebit -rpcpassword=futurebit +rpcpassword=vw28PnhzS5Wf daemon=0 maxconnections=32 upnp=1 uacomment=FutureBit-Apollo-Node -#USER_INPUT_START -hello=world -#USER_INPUT_END diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index e8ce1c6..e1cbb89 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -4,7 +4,7 @@ services: build: context: . dockerfile: Dockerfile - user: 1000:1000 + user: root volumes: - .:/opt/apolloapi command: sh -c "yarn --production=false && yarn dev" @@ -16,7 +16,7 @@ services: build: context: . dockerfile: Dockerfile - user: 1000:1000 + user: root volumes: - ./apolloui:/app command: sh -c "npm start" diff --git a/src/utils.js b/src/utils.js index fbaf6bd..228e7bc 100644 --- a/src/utils.js +++ b/src/utils.js @@ -16,7 +16,7 @@ module.exports.auth = { }, changeSystemPassword (password) { - exec(`sudo usermod --password ${password} futurebit`) + exec(`echo "futurebit:${password}" | sudo chpasswd`) }, async changeNodeRpcPassword (password) {