Commit 564fa049 authored by TJ Horner's avatar TJ Horner

E

parent 087d5471
BOT_TOKEN=
\ No newline at end of file
BOT_TOKEN=
DB_URL=mongodb://db/botname
\ No newline at end of file
{
"BOT_TOKEN": "Telegram bot token",
"DB_URL": "mongodb://db/botname",
"DEBUG": true
}
\ No newline at end of file
const config = require('./config.js')
const mongoose = require('mongoose')
mongoose.connect(config.DB_URL || "mongodb://db")
mongoose.connect(config.DB_URL || "mongodb://db/botname")
const User = mongoose.model("User", {
telegramId: {
......
......@@ -6,7 +6,7 @@ services:
depends_on:
- db
environment:
DB_URL: mongodb://db
DB_URL: mongodb://db/botname
env_file: .env
db:
image: mongo:3.2.20-jessie
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment