diff --git a/Dockerfile b/Dockerfile index 27f298e..b41b735 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,3 +23,6 @@ COPY logging.conf src # Generating po file with translations RUN msgfmt -o src/locales/en/LC_MESSAGES/base.mo src/locales/en/LC_MESSAGES/base.po RUN msgfmt -o src/locales/pt_BR/LC_MESSAGES/base.mo src/locales/pt_BR/LC_MESSAGES/base.po + +# Starting the Bot +CMD poetry run python src/bot.py diff --git a/src/bot.py b/src/bot.py index 99e0364..47de1aa 100644 --- a/src/bot.py +++ b/src/bot.py @@ -1,14 +1,14 @@ from asyncio import run as async_run from logging import getLogger from logging.config import fileConfig as logConfig -from os import getenv +from os import getenv, path from slack_bolt.adapter.socket_mode.async_handler import AsyncSocketModeHandler from slack_bolt.async_app import AsyncApp from src.listeners.register import register_listeners -logConfig("./logging.conf", disable_existing_loggers=False) +logConfig(path.join(path.dirname(path.abspath(__file__)), 'logging.conf'), disable_existing_loggers=False) logger = getLogger(__name__) SLACK_BOT_TOKEN = getenv("SLACK_BOT_TOKEN", "").strip()