Skip to content

Miroslavsckaya/tg_rss_bot

Repository files navigation

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

Running prebuild Docker Image

Running the bot

docker run -e RSSBOT_DSN=yyy RSSBOT_TG_TOKEN=xxx miroslavskaya/tg_rss_bot bot.py

Running update

docker run -e RSSBOT_DSN=yyy RSSBOT_TG_TOKEN=xxx miroslavskaya/tg_rss_bot update.py

Building and running Docker image from source

docker build . -t tg_rss_bot

Running the bot

docker run -e RSSBOT_DSN=yyy RSSBOT_TG_TOKEN=xxx tg_rss_bot bot.py

Running update

docker run -e RSSBOT_DSN=yyy RSSBOT_TG_TOKEN=xxx tg_rss_bot update.py

Using Docker Compose

Running the bot

docker-compose up

Running the update

docker-compose run app update.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published