From 2e4977a12bb2a117340cc0cd43a9010b71367eb8 Mon Sep 17 00:00:00 2001 From: Alexey Date: Mon, 28 Oct 2019 21:39:38 +0300 Subject: [PATCH] WIP --- docker-compose.yml | 8 +++++--- index.js | 7 +++++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 42325f4..a3dee7d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,4 +1,4 @@ -version: '2' +version: '2.2' services: relayer: @@ -6,9 +6,11 @@ services: restart: always environment: NODE_ENV: production - VIRTUAL_HOST: kovan.tornado.cash - LETSENCRYPT_HOST: kovan.tornado.cash + VIRTUAL_HOST: mainnet.tornado.cash + LETSENCRYPT_HOST: mainnet.tornado.cash env_file: ./.env + healthcheck: + test: curl -sS http://127.0.0.1:8000 || exit 1 networks: default: diff --git a/index.js b/index.js index 38aa3bd..5172e62 100644 --- a/index.js +++ b/index.js @@ -33,8 +33,11 @@ const ethPriceInDai = toWei('200') app.get('/', function (req, res) { // just for testing purposes - res.send(`Tornado mixer relayer. Gas Price is ${JSON.stringify(gasPrices)}. - Mixer addresses are ${JSON.stringify(mixers)}`) + res.send('This is tornado.cash Relayer service. Check the /status for settings') +}) + +app.get('/status', function (req, res) { + res.json({ relayerAddress: web3.eth.defaultAccount, gasPrices, netId }) }) app.post('/relay', async (req, resp) => {