Skip to content

Commit

Permalink
Run bot as a python module.
Browse files Browse the repository at this point in the history
  • Loading branch information
thelebster committed Sep 4, 2021
1 parent d811d21 commit 4b7cd90
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ RUN cd /tmp \
&& pip install -r /tmp/requirements.txt

COPY s3_bucket_bot /srv/s3_bucket_bot
WORKDIR /
WORKDIR /srv

ENV TELEGRAM_API_TOKEN=${TELEGRAM_API_TOKEN}
HEALTHCHECK --interval=30s --timeout=30s --start-period=1ms --retries=3 \
CMD curl --fail https://api.telegram.org/bot${TELEGRAM_API_TOKEN}/getWebhookInfo || exit 1

CMD python /srv/s3_bucket_bot/bot.py
CMD python -m s3_bucket_bot
4 changes: 4 additions & 0 deletions s3_bucket_bot/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .bot import main

if __name__ == '__main__':
main()

0 comments on commit 4b7cd90

Please sign in to comment.