From 41b7eb32b68677662e334df8a452fc073c3d07d6 Mon Sep 17 00:00:00 2001 From: mitsuha_s Date: Fri, 5 Aug 2022 00:40:22 +0300 Subject: [PATCH] add running the bot and runnig update with Docker documentation to README.md; add .env.dist to .dockerignore; set default value to LOG_LEVEL in .env.dist --- .dockerignore | 3 ++- .env.dist | 2 +- README.md | 25 +++++++++++++++++++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 50589fe..f90298c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,4 +13,5 @@ pylama.ini README.md # Environment -.env \ No newline at end of file +.env +.env.dist \ No newline at end of file diff --git a/.env.dist b/.env.dist index f435049..6f0acb7 100644 --- a/.env.dist +++ b/.env.dist @@ -5,4 +5,4 @@ RSSBOT_TG_TOKEN=1234567890:yourbotstoken # POSTGRES_USER=xxx # POSTGRES_PASSWORD=xxx # POSTGRES_DB=xxx -# LOG_LEVEL=xxx \ No newline at end of file +# LOG_LEVEL=INFO \ No newline at end of file diff --git a/README.md b/README.md index 64300b7..9ccee90 100644 --- a/README.md +++ b/README.md @@ -43,4 +43,29 @@ python bot.py export RSSBOT_TG_TOKEN=xxx export RSSBOT_DSN=xxx python update.py +``` + +## Runnig the bot with Docker + +```shell +docker build . -t tg_bot +docker run tg_bot +``` + +## Runnig the update with Docker + +```shell +docker run tg_bot update.py +``` + +## Running the bot with docker-compose + +```shell +docker-compose up +``` + +## Running the update with docker-compose + +```shell +docker-compose run app update.py ``` \ No newline at end of file