Spring Boot app that fetches real-time flight data from AviationStack API, and ML to predict status
242
cat < README.md
This is a Spring Boot application that integrates with Kafka and the AviationStack API to provide flight-related predictions or data processing. It uses WebFlux for reactive programming and caching with Caffeine.
localhost:9092) is required for message processing.```bash docker pull jujuwry/kafkaflightpredictor:latest ```
The application requires an .env file or environment variables for configuration. Create an .env file with the following structure:
``` aviationstack.api.key=YOUR_AVIATIONSTACK_API_KEY spring.kafka.bootstrap-servers=localhost:9092 kafka.topic.flights=flight-details spring.kafka.consumer.group-id=flight-consumer-group spring.kafka.consumer.properties.spring.json.trusted.packages=com.george.model ```
Replace YOUR_AVIATIONSTACK_API_KEY with your actual AviationStack API key.
Mount the .env file or pass environment variables directly:
.env File```bash docker run -p 8080:8080 -v /path/to/.env:/app/.env jujuwry/kafkaflightpredictor:latest ```
```bash docker run -p 8080:8080 \ -e "aviationstack.api.key=YOUR_AVIATIONSTACK_API_KEY" \ -e "spring.kafka.bootstrap-servers=localhost:9092" \ -e "kafka.topic.flights=flight-details" \ -e "spring.kafka.consumer.group-id=flight-consumer-group" \ -e "spring.kafka.consumer.properties.spring.json.trusted.packages=com.george.model" \ jujuwry/kafkaflightpredictor:latest ```
http://localhost:8080.aviationstack.api.key is a placeholder in the image. You must provide your own key, as the original key is not included for security.spring.kafka.bootstrap-servers and kafka.topic.flights to match your Kafka setup.If you want to build the image yourself:
Dockerfile.Content type
Image
Digest
sha256:4ac03d366…
Size
345 MB
Last updated
over 1 year ago
docker pull jujuwry/kafkaflightpredictor