From cd4b580641e13faa72096acf16631644476a0220 Mon Sep 17 00:00:00 2001 From: Anton Palgunov Date: Fri, 31 Mar 2023 21:08:16 +0100 Subject: [PATCH] add docker --- Dockerfile | 10 ++++++++++ readme.md => Readme.md | 2 +- main.py => bot.py | 0 docker-compose.yml | 5 +++++ 4 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 Dockerfile rename readme.md => Readme.md (99%) rename main.py => bot.py (100%) create mode 100644 docker-compose.yml diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..88cc8c3 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM python:3.9-slim-buster + +WORKDIR /app + +COPY requirements.txt requirements.txt +RUN pip3 install -r requirements.txt + +COPY . . + +CMD ["python3", "bot.py"] \ No newline at end of file diff --git a/readme.md b/Readme.md similarity index 99% rename from readme.md rename to Readme.md index 39c299a..1e8ef85 100644 --- a/readme.md +++ b/Readme.md @@ -22,7 +22,7 @@ This will install the `pyTelegramBotAPI` and `openai` packages, which are needed To start the bot, run the following command: -`python main.py` +`python bot.py` This will start the bot and it will begin listening for incoming messages from users. Whenever a user sends a message, the bot will use the ChatGPT model to generate a response and send it back to the user. diff --git a/main.py b/bot.py similarity index 100% rename from main.py rename to bot.py diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6ad9c9f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,5 @@ +version: '3' +services: + bot: + build: . + command: python3 bot.py \ No newline at end of file