diff --git a/.dockerignore b/.dockerignore index b827eaf..148f052 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,3 +1,5 @@ -node_modules -test -#config/config.yaml +node_modules/ +test/ +config/config.yaml +*.db +*.log \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index dceb9dc..549fa81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ COPY . /bot RUN apk update RUN apk add wget python3 build-base -RUN rm -rf node_modules RUN npm install CMD ["npm", "run", "prod", "--prefix", "/bot"] diff --git a/src/index.ts b/src/index.ts index aacd7b9..e58a6e4 100644 --- a/src/index.ts +++ b/src/index.ts @@ -17,7 +17,6 @@ import * as error from './error'; import * as webserver from './addons/web'; import * as signal from './addons/signal'; -import { create } from 'domain'; // Create new Telegraf() with token let defaultBot; @@ -44,13 +43,6 @@ function main(bot = defaultBot, logs = true) { // Init error handling error.init(bot, logs); - // TODO: Unit testing - const testing = false; - if (testing) { - const {tests} = require('../tests/testing'); - tests(bot); - } - // Use session and check for permissions on message bot.use(permissions.currentSession()); bot.use((ctx, next) => {