Skip to content

Commit

Permalink
Adding entrypoint to start the bot using dockerfiler cmd (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcieltorres authored Apr 13, 2024
1 parent 2640e91 commit d30b3b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/bot.py
Original file line number Diff line number Diff line change
@@ -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()
Expand Down

0 comments on commit d30b3b7

Please sign in to comment.