Quick Start Guide
This guide will help you get the entire StreamLine Logistics system running on your local machine using Docker Compose.Prerequisites
Before you begin, ensure you have the following installed:- Docker (version 20.10 or higher)
- Docker Compose (version 2.0 or higher)
- Java 17 (for local development)
- Maven 3.8+ (for building from source)
- Git (to clone the repository)
The Docker Compose setup will automatically handle all database and service dependencies. You don’t need to install PostgreSQL, MySQL, or MongoDB separately.
Getting Started
Build the Services
Build all microservices using Maven. This will compile the code and create Docker images:This command will:
The build process uses Spring Boot 4.0.2 with Java 17 and includes Lombok and MapStruct annotation processors.
- Compile all microservices
- Run unit tests
- Generate Jacoco coverage reports
- Package each service as an executable JAR
Start the System
Launch all services and databases using Docker Compose:This single command will start:
- 3 databases: PostgreSQL (orders), MySQL (inventory), MongoDB (tracking)
- Eureka Server: Service discovery
- Order Service: Order management API
- Inventory Service: Stock management API
- Tracking Service: Shipment tracking API
The
-d flag runs containers in detached mode. Omit it if you want to see logs in your terminal.Verify Services are Running
Check that all containers are healthy:You should see all services in the “Up” state:
Access the Eureka Dashboard
Open your browser and navigate to the Eureka Server dashboard:You should see all three microservices registered:
MSVC-ORDERMSVC-INVENTORYMSVC-TRACKING
Service Ports Reference
All services are accessible on the following ports:| Service | Port | URL | Status |
|---|---|---|---|
| Eureka Server | 8761 | http://localhost:8761 | ✅ Active |
| Order Service | 8090 | http://localhost:8090 | ✅ Active |
| Inventory Service | 9090 | http://localhost:9090 | ✅ Active |
| Tracking Service | 8091 | http://localhost:8091 | ✅ Active |
| PostgreSQL (Orders) | 5432 | localhost:5432 | ✅ Active |
| MySQL (Inventory) | 3306 | localhost:3306 | ✅ Active |
| MongoDB (Tracking) | 27017 | localhost:27017 | ✅ Active |
| API Gateway | 8080 | http://localhost:8080 | ⚠️ Not in docker-compose |
| Config Server | 8888 | http://localhost:8888 | ⚠️ Not in docker-compose |
The API Gateway and Config Server modules exist in the codebase but are not yet included in the docker-compose.yml deployment. Services can be accessed directly on their respective ports.
Database Connections
If you need to connect directly to the databases for debugging:Example API Workflows
Managing Inventory
Viewing Logs
To view logs for a specific service:Stopping the System
To stop all services while preserving data:Troubleshooting
Services not registering with Eureka
Services not registering with Eureka
Problem: Microservices don’t appear in the Eureka dashboard.Solution:
- Ensure Eureka Server is running:
docker-compose ps eureka-server - Check service logs:
docker-compose logs inventory-service - Verify network connectivity: All services must be on the
microservices-network - Wait 30-60 seconds - registration may take time on slower systems
Database connection errors
Database connection errors
Problem: Services fail to connect to databases.Solution:
- Verify databases are running:
docker-compose ps order_db inventory_db tracking_db - Check database logs:
docker-compose logs order_db - Ensure databases are ready before services start (add healthchecks to docker-compose.yml)
- Verify connection strings in application.yml files match container names
Port conflicts
Port conflicts
Problem:
Bind for 0.0.0.0:8090 failed: port is already allocatedSolution:- Check what’s using the port:
lsof -i :8090(macOS/Linux) ornetstat -ano | findstr :8090(Windows) - Stop the conflicting process or change the port mapping in docker-compose.yml
- Example: Change
"8090:8090"to"8095:8090"to use port 8095 externally
Out of memory errors
Out of memory errors
Problem: Services crash with OutOfMemoryError.Solution:
- Increase Docker memory allocation in Docker Desktop settings (minimum 4GB recommended)
- Add JVM memory limits in Dockerfiles:
JAVA_OPTS="-Xmx512m -Xms256m" - Stop unused services to free resources
Next Steps
Now that your system is running:Architecture
Learn about the system architecture and data models
API Reference
Explore the complete API documentation