Skip to content

Agusioma/circleci-microservices-unit-testing-demo

Repository files navigation

Microservices Demo with Docker Compose

This repository demonstrates a microservices architecture using Docker Compose. The system consists of three microservices:

  1. Spring Boot Service(springboot-service)
  2. Stats Service(stats-service)
  3. Logs Service(logs-service)

The services interact with a MySQL database to provide functionality for capturing and managing data related to animal visits and veterinarians.


Prerequisites

Before running the application, ensure the following are installed:


Getting Started

Follow these steps to run the microservices:

  1. Clone the Repository:

    git clone https://github.com/Agusioma/circleci-microservices-unit-testing-demo.git
    cd circleci-microservices-unit-testing-demo
  2. Start the Docker Containers: Run the following command to start all services:

    docker-compose up --build

    This command will build the images for each service and start the containers. The services will be accessible after the containers are fully initialized.


Accessing the Services

Spring Boot Service

Stats Service

Logs Service

  • Internal Usage Only: The logs service is called internally by the Spring Boot Service to log data.
  • Endpoint: logs-service:5001/api/logs
  • It records logs whenever a new veterinarian or animal visit is added.

Stopping the Application

To stop all services, run:

docker-compose down

This command stops and removes the containers but preserves the database data stored in the Docker volume.


Additional Notes

  • Ensure the Docker daemon is running before executing the commands.
  • Logs can be viewed for debugging by using:
    docker-compose logs
  • If you encounter connection issues, verify the services are healthy by running:
    docker ps

If you have any questions, feel free to open an issue in this repository.

Microservices Demo with Docker Compose

This repository demonstrates a microservices architecture using Docker Compose. The system consists of three microservices:

  1. Spring Boot Service(springboot-service)
  2. Stats Service(stats-service)
  3. Logs Service(logs-service)

The services interact with a MySQL database to provide functionality for capturing and managing data related to animal visits and veterinarians.


Prerequisites

Before running the application, ensure the following are installed:


Getting Started

Follow these steps to run the microservices:

  1. Clone the Repository:

    git clone https://github.com/Agusioma/circleci-microservices-unit-testing-demo.git
    cd circleci-microservices-unit-testing-demo
  2. Start the Docker Containers: Run the following command to start all services:

    docker-compose up --build

    This command will build the images for each service and start the containers. The services will be accessible after the containers are fully initialized.


Accessing the Services

Spring Boot Service

Stats Service

Logs Service

  • Internal Usage Only: The logs service is called internally by the Spring Boot Service to log data.
  • Endpoint: logs-service:5001/api/logs
  • It records logs whenever a new veterinarian or animal visit is added.

Stopping the Application

To stop all services, run:

docker-compose down

This command stops and removes the containers but preserves the database data stored in the Docker volume.


Additional Notes

  • Ensure the Docker daemon is running before executing the commands.
  • Logs can be viewed for debugging by using:
    docker-compose logs
  • If you encounter connection issues, verify the services are healthy by running:
    docker ps

If you have any questions, feel free to open an issue in this repository.

About

Demo on Microservices unit testing in CircleCI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published