Moved db.js to shared code dir
This commit is contained in:
parent
b65785b320
commit
2aa1fea0c8
|
@ -9,6 +9,6 @@ COPY ./bncWatcher/package.json /watcher/
|
|||
|
||||
RUN npm install
|
||||
|
||||
COPY ./bncWatcher/bncWatcher.js ./bncWatcher/db.js /watcher/
|
||||
COPY ./bncWatcher/bncWatcher.js ./shared/db.js /watcher/
|
||||
|
||||
ENTRYPOINT ["node", "bncWatcher.js"]
|
||||
|
|
|
@ -9,6 +9,6 @@ COPY ./ethWatcher/package.json /watcher/
|
|||
|
||||
RUN npm install
|
||||
|
||||
COPY ./ethWatcher/ethWatcher.js ./ethWatcher/db.js /watcher/
|
||||
COPY ./ethWatcher/ethWatcher.js ./shared/db.js /watcher/
|
||||
|
||||
ENTRYPOINT ["node", "ethWatcher.js"]
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
const Redis = require('ioredis')
|
||||
|
||||
console.log('Connecting to redis')
|
||||
|
||||
const redis = new Redis({
|
||||
port: 6379,
|
||||
host: 'redis',
|
||||
family: 4,
|
||||
db: 0
|
||||
})
|
||||
|
||||
redis.on('connect', () => {
|
||||
console.log('Connected to redis')
|
||||
})
|
||||
|
||||
redis.on('error', () => {
|
||||
console.log('Redis error')
|
||||
})
|
||||
|
||||
module.exports = redis
|
Loading…
Reference in New Issue