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 mongoOptions = {
useNewUrlParser: true,
useUnifiedTopology: 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)
console.log('CONNECTED TO MONGODB')
})

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

Loading…
Cancel
Save