Before running the service, you will need to customize several properties or environment variables:
Property | Description | Default value |
---|---|---|
TELEGRAM_BOT_TOKEN |
The Telegram Bot token provided by @BotFather | None |
MONGODB_HOST |
The MongoDB instance hostname or ip | localhost |
MONGODB_PORT |
The MongoDB port | 27017 |
MONGODB_USERNAME |
The MongoDB username | admin (*) |
MONGODB_PASSWORD |
The MongoDB password | admin (*) |
MONGODB_DATABASE |
The MongoDB database | rss_tracker_db |
EUREKA_SERVER_HOST |
Eureka server hostname | localhost |
EUREKA_SERVER_PORT |
Eureka server port | 8761 |
EUREKA_SERVER_USERNAME |
Username to login at the Eureka server | admin (*) |
EUREKA_SERVER_PASSWORD |
Password to login at the Eureka server | admin (*) |
*: It is highly recommended to change both default username and password.
Please note:
- For Docker and Docker Compose running modes, you might want to use a
.env
file to configure the previous properties.
Only on Docker Compose running mode:
MONGODB_HOST
value is ignored when using. It will use a default hostnamemongodb
specified by thedocker-compose.yml
file.MONGODB_PORT
refers to the exposed MongoDB port to the Docker host (internally the container will still use27017
). Use this port if you need to connect with your MongoDB database manager.
There are several ways to run the service.
- Java Standalone
- Docker Standalone
- Docker Compose
- JDK 11.
- Maven.
- MongoDB instance running with user and password.
Open a terminal, clone the repo and build with maven:
git clone https://github.com/Flashky/rss-tracker-bot.git
cd rss-tracker-bot
mvn clean package
Edit run_standalone.sh
to modify the configuration properties as you need.
Give permissions and execute:
chmod +x run_standalone.sh
./run_standalone.sh
- Docker.
- MongoDB instance running with user and password.
Download the latest docker image:
docker pull flashk/rss-tracker-bot:latest
Basic run, asumming you have declared the needed configuration properties as environment variables:
docker run --name rss-tracker-bot -dp 8080:8080 flashk/rss-tracker-bot:latest
In case of using a .env
file to configure the properties, you can run the container using the --env-file
flag:
docker run --name rss-tracker-bot --env-file .env -dp 8080:8080 flashk/rss-tracker-bot:latest
See rss-tracker-app repository.