The Order Info Service is a Spring Boot application that provides order information by interacting with external services. It integrates with the Order Search Service and the Product Info Service to fetch and aggregate order details.
order-info-service
: Main service that provides order information.Reactive_Paradigm_FOR_STUDENTS
: Git submodule containing the Order Search Service and Product Info Service.
- Docker
- Docker Compose
- MongoDB: Database service used by the Order Info Service.
- Order Search Service: External service to search orders by phone number.
- Product Info Service: External service to fetch product information.
git clone git@github.com:rushawnwhite29/gridu_rwhite_reactive_user_order_service.git
cd gridu_rwhite_reactive_user_order_service
git submodule update --init --recursive
Use Docker Compose to build and run the services:
docker-compose up --build
This command will:
- Start MongoDB and import initial data.
- Build and start the Order Search Service.
- Build and start the Product Info Service.
- Build and start the Order Info Service.
- Order Info Service:
http://localhost:8080
- Order Search Service:
http://localhost:8081
- Product Info Service:
http://localhost:8082
The docker-compose.yml
file contains environment variables for configuring the services:
MONGO_DB_NAME
: Name of the MongoDB database.MONGO_ROOT_USERNAME
: MongoDB root username.MONGO_ROOT_PASSWORD
: MongoDB root password.SPRING_DATA_MONGODB_URI
: MongoDB connection URI.ORDER_SEARCH_SERVICE_URL
: URL of the Order Search Service.PRODUCT_INFO_SERVICE_URL
: URL of the Product Info Service.
To stop the services, run:
docker-compose down
This command will stop and remove all the containers.
- MongoDB Data Import: The
mongoimport
service imports initial data fromReactive_Paradigm_FOR_STUDENTS/mongo/data/users.json
. - Service Dependencies: The
order-info-service
depends on MongoDB and the external services to function correctly.
- Ensure Docker and Docker Compose are installed and running.
- Verify that the submodule
Reactive_Paradigm_FOR_STUDENTS
is correctly initialized and updated. - Check the logs of each service for any errors using:
docker-compose logs <service_name>
Replace <service_name>
with the name of the service (e.g., order-info-service
, mongo
, etc.).