Initially, the bot was created by me for personal purposes. When I didn't know what to cook, I took a random recipe from notes. Then I decided to make this bot for these purposes. But you can use it as a bag in which you can put any items and endlessly pull out recipes without repeating.
Python 3.9
poetry
.env
file with following variables:MONGO_ROOT_PASSWORD MONGO_ROOT_USERNAME MONGO_USER MONGO_PASSWORD MONGO_HOST MONGO_PORT MONGO_RECIPE_DB TG_TOKEN WEBHOOK_HOST WEBHOOK_PATH WEBHOOK_PORT WEBAPP_HOST WEBAPP_PORT
To install all dependencies use command:
poetry install -n
You can learn more about poetry
here:
To install without dev dependenices (for run project only without tests and linters) use following command:
poetry install -n --no-dev
poetry run python server.py -e polling
poetry run pytest -v
Testing can be run only with dev dependecies
At first you need to install docker-compose
.
How to do this you can read here:
After installing docker-compose
you need to run the following command:
docker-compose up -d
- Гайд по
github actions
: https://youtu.be/Yg5rpke79X4 - Гайд как запустить контейнер на
AWS EC2
черезcli
на сервере: https://github.com/gavrilka/TelegramBot - Deploy
docker-compose
onAWS ECS EC2
: https://dev.to/raphaelmansuy/10-minutes-to-deploy-a-docker-compose-stack-on-aws-illustrated-with-hasura-and-postgres-3f6e
More guides in README comming soon.
Footnotes
-
Обзор
poetry
от Диджитализируй!: https://youtu.be/KOC0Gbo_0HY ↩ -
poetry
official documentation: https://python-poetry.org/docs/ ↩ -
Установка
Docker
дляUbuntu 18.04
: https://www.digitalocean.com/community/tutorials/docker-ubuntu-18-04-1-ru ↩ -
Установка
docker-compose
дляUbuntu 18.04
: https://www.digitalocean.com/community/tutorials/how-to-install-docker-compose-on-ubuntu-18-04-ru ↩ -
Install
Docker
: https://docs.docker.com/engine/install/ ↩ -
Install
docker-compose
: https://docs.docker.com/compose/install/ ↩