Introduction
Spring PetClinic is a well-known sample application built with Spring Boot and Spring Cloud. What makes it interesting from a DevOps perspective is that it is not a single application — it is a distributed system made up of 8 separate microservices that all need to work together. Each service has its own responsibility, its own port, and its own dependencies.
As part of my DMI Cohort 2 final project, I deployed the full Spring PetClinic Microservices stack locally on my Ubuntu Linux machine using Docker Compose. In this post I will walk you through exactly how I did it, what broke along the way, and what the observability stack showed me once everything was running.
Prerequisites
Before starting, make sure you have the following installed on your machine:
Docker — version 29.6.1 or later. Verify with: docker --version
Docker Compose — included with modern Docker installations
Git — to clone the repository
A stable internet connection — the config-server fetches configuration from GitHub on startup
Step 1 — Clone the Repository
git clone to see all services being monitored. Run this query in the Expression bar to see live request counts:
http_server_requests_seconds_count
The graph shows climbing lines for each service — proof that real traffic is flowing through the system.
Grafana turns all that Prometheus data into visual dashboards. Open
After restarting the services with docker compose up -d --force-recreate, Zipkin immediately started showing live traces. I could see individual requests travelling through api-gateway, customers-service, visits-service, and vets-service — with the exact time each hop took. This is the same fix I had applied to our production AKS Helm charts on May 20th during the team project.
Step 6 — Clean Up
When you are done, stop and remove all containers with:
docker compose down
This stops every container and removes the network cleanly. Your images remain so the next startup is faster.
Key Takeaway
The biggest lesson from this deployment was understanding that microservices are not just about splitting an application into smaller pieces — they require careful orchestration. The startup order, service discovery, configuration management, and observability all need to be in place before you can say the system is truly running. Docker Compose makes it possible to experience all of this locally before touching a cloud environment.
About DMI
This deployment was completed as part of the DMI Micro-Internship Cohort 2, run by Pravin Mishra through CloudAdvisory Oy. DMI gives you real hands-on DevOps experience working in a team on production-grade infrastructure. If you want to build skills like this, join the DMI Cohort 4 waiting list here:
https://forms.gle/B5FqjrVryqxZ5UrX7
SOCIAL SHARE CARD GENERATOR