update 1.2

master
cheetah 5 years ago
parent 55616074dd
commit 628c54d569

@ -1,4 +0,0 @@
{
"mongodbURI": "mongodb://admin:admin@mongo:27017",
"mongodbName": "mcaccountschecker"
}

@ -1,12 +1,12 @@
const config = require('./config') //const config = require('./config')
const mongoose = require('mongoose') const mongoose = require('mongoose')
const mongoOptions = { const mongoOptions = {
useNewUrlParser: true, useNewUrlParser: true,
useUnifiedTopology: true, useUnifiedTopology: true,
useFindAndModify: true, useFindAndModify: true,
dbName: config.mongodbName dbName: process.env.MONGO_DBNAME || 'mcaccountschecker',
} }
mongoose.connect(config.mongodbURI, mongoOptions, (err) => { mongoose.connect(process.env.MONGO_DBURI || 'mongodb://admin:admin@mongo:27017', mongoOptions, (err) => {
if (!!err) process.exit(1) if (!!err) process.exit(1)
console.log('CONNECTED TO MONGODB') console.log('CONNECTED TO MONGODB')
}) })

@ -15,9 +15,11 @@ services:
mcbulkaccountcheckerandwatcher: mcbulkaccountcheckerandwatcher:
image: "cuddlycheetah/mcbulkaccountcheckerandwatcher" image: "cuddlycheetah/mcbulkaccountcheckerandwatcher"
restart: unless-stopped restart: unless-stopped
# if you dont need the mongodb container, mae sure to remove these two lines too
links: links:
- mongo - mongo
volumes: environment:
- ./config.json/:/usr/src/config.json - MONGO_DBURI: 'mongodb://admin:admin@mongo:27017'
- MONGO_DBNAME: 'mcaccountschecker'
ports: ports:
- "6969:6969/tcp" - "6969:6969/tcp"

Loading…
Cancel
Save