"# MicroServices" Project Setup and Deployment Guide This guide will walk you through the steps to clone, build, and deploy the project using Docker Compose. Please follow the instructions below to get the project up and running.

Prerequisites Before you begin, ensure you have the following software installed on your system:

Git Maven Docker Docker Compose

Step 1: Clone the Project Clone the repository to your local machine using Git:

bash Copy code git clone https://github.com/azizsnoussi/MicroServices-TheCodeOfDuty-5TWIN4 cd your-project

Step 2: Build the Project Use Maven to build the project. Make sure you are in the project root directory:

bash Copy code mvn clean install

Step 3: Build Docker Images Build Docker images for each project in the repository. Navigate to each project's directory and build the Docker image:

bash Copy code cd project1 docker build -t project1-image . cd ../project2 docker build -t project2-image .

Step 4: Docker Compose Navigate back to the root directory of the project and use Docker Compose to start the services. The provided docker-compose.yml file defines the services and their configurations:

bash Copy code docker-compose up -d This command will start all the services defined in the docker-compose.yml file in detached mode.

Step 5: Testing Once the services are up and running, you can test your application. Depending on your project and its services, open a web browser or use tools like Postman to interact with the application.

Access the services as needed using the appropriate URLs, such as http://localhost:port. Refer to each project's documentation for specific endpoints and usage.

Step 6: Stopping and Cleanup To stop and remove the services, run the following Docker Compose command:

bash Copy code docker-compose down This will stop and remove all containers defined in the docker-compose.yml file.

That's it! You've successfully cloned, built, and deployed the project using Docker Compose. Enjoy using the application!