Find a file
2022-08-13 12:55:26 +03:00
.dockerignore add EOL to .gitignore, .dockerignor and README.md 2022-08-13 12:55:26 +03:00
.drone.yml #20 Pipelines merged. Deploy pipeline removed for now. Pylama now checks only changed files. 2022-05-31 02:20:19 +03:00
.env.dist 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 2022-08-05 00:40:22 +03:00
.gitignore add EOL to .gitignore, .dockerignor and README.md 2022-08-13 12:55:26 +03:00
bot.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00
database.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00
docker-compose.yml add optional variables in .env.dist; remove *.db from .gitignore; add build command in docker-compose.yml 2022-07-27 18:20:58 +03:00
Dockerfile remove invalid values in docker-compose.yml and add little documentation for environment values 2022-07-26 19:38:38 +00:00
exceptions.py #2 #7 Telegram module (#10) 2022-05-30 23:54:26 +03:00
pylama.ini Update manager (#23) 2022-07-08 22:23:12 +03:00
README.md add EOL to .gitignore, .dockerignor and README.md 2022-08-13 12:55:26 +03:00
requirements.txt Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00
rss.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00
telegram.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00
update.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00
update_manager.py Migrate to PostgreSQL (#39) 2022-07-14 01:53:53 +03:00

Telegram RSS Bot

Build Status

Setting up virtual environment

To be able to isolate project environment we'll use Python's venv.

Setting up new environment and installing dependencies

# Create VirtualEnv directory
python -m venv ./.venv
# Loading environment
source .venv/bin/activate
# Installing dependencies
pip install -r requirements.txt

Adding dependencies

# Installing new dependency
pip install somedependency
# Rewriting dependency file
pip freeze > requirements.txt

Do not forget to install the latest dependencies before adding new dependencies and rewriting the requirements.txt file. Otherwise old dependencies could be lost.

Running the bot

export RSSBOT_TG_TOKEN=xxx
export RSSBOT_DSN=xxx
python bot.py

Running the update

export RSSBOT_TG_TOKEN=xxx
export RSSBOT_DSN=xxx
python update.py

Runnig the bot with Docker

docker build . -t tg_bot
docker run tg_bot

Runnig the update with Docker

docker run tg_bot update.py

Running the bot with docker-compose

docker-compose up

Running the update with docker-compose

docker-compose run app update.py