mirror of
https://github.com/tornadocash/tornado-root-updater.git
synced 2024-12-04 23:15:05 +01:00
fix: update docker
This commit is contained in:
parent
a632aafb8c
commit
1e823711b3
@ -10,8 +10,9 @@ APP_PORT=8000
|
||||
|
||||
# Gas price in Gwei
|
||||
GAS_PRICE=200
|
||||
# should not be more often than CONFIRMATION_BLOCKS time. default is once per hour
|
||||
CRON_EXPRESSION="0 0 * * * *"
|
||||
|
||||
VIRTUAL_HOST=example.duckdns.org
|
||||
LETSENCRYPT_HOST=example.duckdns.org
|
||||
|
||||
|
||||
CONFIRMATION_BLOCKS=1
|
||||
|
@ -2,7 +2,8 @@ version: '2'
|
||||
|
||||
services:
|
||||
app:
|
||||
image: tornadocash/tornado-root-updater:goerli
|
||||
# image: tornadocash/tornado-root-updater:server
|
||||
build: .
|
||||
depends_on: [redis]
|
||||
restart: always
|
||||
env_file: .env
|
||||
@ -31,6 +32,26 @@ services:
|
||||
logging:
|
||||
driver: none
|
||||
|
||||
dockergen:
|
||||
image: poma/docker-gen
|
||||
container_name: dockergen
|
||||
restart: always
|
||||
command: -notify-sighup nginx -watch /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
|
||||
volumes_from:
|
||||
- nginx
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
|
||||
letsencrypt:
|
||||
image: jrcs/letsencrypt-nginx-proxy-companion
|
||||
container_name: letsencrypt
|
||||
restart: always
|
||||
environment:
|
||||
NGINX_DOCKER_GEN_CONTAINER: dockergen
|
||||
volumes_from:
|
||||
- nginx
|
||||
- dockergen
|
||||
|
||||
volumes:
|
||||
conf:
|
||||
vhost:
|
||||
|
@ -7,7 +7,7 @@
|
||||
"server": "node src/server.js",
|
||||
"treeWatcher": "node src/treeWatcher",
|
||||
"lint": "eslint --ext .js --ignore-path .gitignore .",
|
||||
"start": "yarn server & yarn treeWatcher"
|
||||
"start": "yarn server"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "Roman Semenov <semenov.roma@gmail.com>",
|
||||
|
@ -14,5 +14,4 @@ module.exports = {
|
||||
port: process.env.APP_PORT || 8000,
|
||||
insertBatchSize: process.env.INSERT_BATCH_SIZE,
|
||||
gasPrice: process.env.GAS_PRICE,
|
||||
cronExpression: process.env.CRON_EXPRESSION,
|
||||
}
|
||||
|
@ -14,7 +14,15 @@ async function getDepositsCallData(req, res) {
|
||||
return res.json({ callData })
|
||||
}
|
||||
|
||||
function test(req, res) {
|
||||
const callData = 'test 123'
|
||||
console.log('deposit:callData', callData)
|
||||
|
||||
return res.json({ callData })
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
test,
|
||||
getWithdrawalsCallData,
|
||||
getDepositsCallData,
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ app.use((err, req, res, next) => {
|
||||
next()
|
||||
})
|
||||
|
||||
app.get('/test', controller.test)
|
||||
app.get('/deposit', controller.getDepositsCallData)
|
||||
app.get('/withdrawal', controller.getWithdrawalsCallData)
|
||||
|
||||
|
@ -1,12 +1,8 @@
|
||||
const cron = require('cron')
|
||||
|
||||
const { action } = require('./utils')
|
||||
const { getEvents } = require('./events')
|
||||
const { updateTree } = require('./update')
|
||||
const { redis, getProviderWs } = require('./singletons')
|
||||
|
||||
const { cronExpression } = require('./config')
|
||||
|
||||
let provider = getProviderWs()
|
||||
|
||||
async function processNewBlock(block) {
|
||||
@ -47,8 +43,6 @@ async function init() {
|
||||
}
|
||||
}
|
||||
|
||||
cron.job(cronExpression, init, null, true, null, null, true)
|
||||
|
||||
process.on('unhandledRejection', error => {
|
||||
console.error('Unhandled promise rejection', error)
|
||||
process.exit(1)
|
||||
|
Loading…
Reference in New Issue
Block a user