SmartNews Tracker is an API that allows users to monitor news based on specific keywords.
94
This Docker image encapsulates a Spring Boot-based microservice application known as SmartNews Tracker. The API periodically queries a news source based on keywords registered by users and sends email alerts whenever new matching articles are found. It connects to a PostgreSQL database for persistence and uses Flyway for schema migrations. Endpoints and data schemas are documented via SpringDoc / OpenAPI 3.0.
Github repository: https://github.com/kauanmocelin/smart-news-tracker
kauanmocelin/smartnewstracker:tagBefore starting the container, make sure you have:
Starting a SmartNews Tracker instance is as simple as running the following command. Be sure to replace tag with the desired image tag and provide the required environment variables:
docker run --name smart-news-tracker -d \
-e DB_URL=jdbc:postgresql://localhost:5432/smartnewstracker \
-e DB_USERNAME=postgres \
-e DB_PASSWORD=postgres \
-e JWT_SECRET_KEY=your_jwt_secret \
-e NEWS_API_KEY=your_news_api_key \
-p 8080:8080 \
kauanmocelin/smartnewstracker:latest
You can customize this Docker image using the following environment variables:
| Variable | Description | Example |
|---|---|---|
SERVER_BASE_URL | Base URL the application is served from | http://localhost |
SERVER_PORT | Port the application listens on internally | 8080 |
DB_URL | JDBC URL for your PostgreSQL database | jdbc:postgresql://localhost:5432/smartnewstracker |
DB_USERNAME | Username for your PostgreSQL database | postgres |
DB_PASSWORD | Password for your PostgreSQL database | postgres |
MAIL_HOST | SMTP host used to send email alerts | localhost |
MAIL_PORT | SMTP port | 1025 |
MAIL_USERNAME | SMTP username | [email protected] |
MAIL_PASSWORD | SMTP password | — |
JWT_SECRET_KEY | 32-byte secret used to sign JWT tokens | — |
NEWS_API_KEY | API key from newsapi.org used to fetch news articles | — |
LOG_DIR | Directory where application logs are written | /tmp |
You can set these variables using the -e flag in the docker run command, as shown in the example above.
The application listens on port 8080 for HTTP traffic by default (configurable via SERVER_PORT). You can map this to any port on your host machine using the -p flag in the docker run command.
This application requires:
DB_URL should point to a running PostgreSQL instance.Content type
Image
Digest
sha256:4ec779b74…
Size
167.6 MB
Last updated
4 months ago
docker pull kauanmocelin/smartnewstracker