From cd70cd067a4e968c6eebeecc4275270547b1b221 Mon Sep 17 00:00:00 2001 From: Anson Date: Sun, 3 Feb 2019 20:51:26 -0700 Subject: [PATCH] Bot now runs in a Docker image --- Dockerfile | 8 ++++++++ requirements.txt | 2 ++ stockBot.py | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 Dockerfile create mode 100644 requirements.txt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ba65593 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM python:3.7-slim + +COPY requirements.txt ./ +RUN pip install --no-cache-dir -r requirements.txt + +COPY . . + +CMD [ "python", "./stockBot.py" ] \ No newline at end of file diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9f4c97c --- /dev/null +++ b/requirements.txt @@ -0,0 +1,2 @@ +telegram==0.0.1 +python-telegram-bot==11.1.0 \ No newline at end of file diff --git a/stockBot.py b/stockBot.py index a280e3d..02571fe 100644 --- a/stockBot.py +++ b/stockBot.py @@ -7,9 +7,10 @@ import urllib.request import telegram from telegram.ext import CommandHandler, Filters, MessageHandler, Updater +import credentials import tickerInfo -TOKEN = "TELEGRAM_TOKEN +TOKEN = credentials.secrets["TELEGRAM_TOKEN"] # Enable logging logging.basicConfig(