惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Check Point Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
L
LangChain Blog
云风的 BLOG
云风的 BLOG
M
MIT News - Artificial intelligence
A
About on SuperTechFans
J
Java Code Geeks
量子位
博客园 - 三生石上(FineUI控件)
博客园 - Franky
博客园_首页
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Apple Machine Learning Research
Apple Machine Learning Research
Engineering at Meta
Engineering at Meta
雷峰网
雷峰网
D
DataBreaches.Net
人人都是产品经理
人人都是产品经理
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Deploying Spring Petclinic Microservices with Docker Comp...
Ebelechukwu Lucy Okafor · 2026-06-16 · via DEV Community

Introduction

As part of my DevOps learning journey in DMI Cohort 2, I deployed the Spring Petclinic Microservices application locally using Docker Compose.

Spring Petclinic is a cloud-native microservices application designed to demonstrate modern software architecture patterns. Instead of a single monolithic application, the system consists of multiple independent services that communicate with one another.

The deployment includes:

Config Server
Discovery Server (Eureka)
API Gateway
Customers Service
Visits Service
Vets Service
GenAI Service
Admin Server

In addition, the application includes a complete observability stack:

Prometheus
Grafana
Zipkin

The goal of this project was to deploy, verify, monitor, and troubleshoot a production-style microservices environment using Docker Compose.

Prerequisites

Before deployment, I installed and configured the following tools:

Docker

Docker was used to build and run all application containers.
Verify installation:
docker --version

Git

Git was used to clone and manage the repository.
Verify installation:
git --version

GitHub Codespaces

I used GitHub Codespaces as my development environment because my AWS account was unavailable during this project.

Step 1: Clone the Repository

I cloned the Spring Petclinic Microservices repository:
git clone https://github.com/PETCLINIC-PROJECT-GROUP-5/spring-petclinic-microservices.git

Navigate into the project:
cd spring-petclinic-microservices

Verify the repository contents:
ls

The repository contained all required microservices, Docker Compose configuration, Kubernetes manifests, and supporting documentation.

Step 2: Start the Application

The entire application can be deployed using a single command:
docker compose up -d

This command performs several tasks:

Pulls required Docker images
Creates containers
Creates a Docker network
Starts services in the background

After execution, Docker reported that all containers started successfully.
Particularly important were:
config-server
discovery-server
Both services became healthy before the remaining services started.

Why Config Server and Discovery Server Start First

The Config Server provides centralised configuration for all microservices.

The Discovery Server (Eureka) allows services to register themselves and discover other services dynamically.

Without these services running first:
Application services cannot load the configuration
Services cannot register with Eureka
Inter-service communication may fail
Docker Compose uses startup dependencies and health checks to ensure the correct startup sequence.

Step 3: Verify Running Containers

To verify deployment status, I ran:
docker compose ps

This displayed all running containers and their health status.
Services included:
config-server
discovery-server
api-gateway
customers-service
visits-service
vets-service
genai-service
admin-server
prometheus-server
grafana-server
tracing-server
All services reported a healthy or running status.

Step 4: Application Verification

After deployment, I verified each application endpoint.

Spring Petclinic
http://localhost:8080

The main application loaded successfully.
Eureka Dashboard
http://localhost:8761

Displayed all registered services.
Spring Boot Admin
http://localhost:9090

Provided centralized monitoring of Spring Boot applications.
Zipkin
http://localhost:9411

Displayed distributed traces across services.
Prometheus
http://localhost:9091

Collected and displayed application metrics.
Grafana
http://localhost:3030

Visualised metrics through dashboards.

Observability Stack
One of the most valuable parts of this project was understanding observability.

Prometheus
Prometheus collected metrics from application services.
I executed queries such as:
http_server_requests_seconds_count

This provided visibility into application requests and performance.

Grafana
Grafana converted Prometheus metrics into visual dashboards.
I was able to monitor:
Service health
Request counts
Response times
Application activity

Zipkin
Zipkin provided distributed tracing.
This allowed me to follow a request as it travelled through multiple microservices.
It demonstrated how modern cloud-native applications handle service-to-service communication.

Biggest Challenge
The most challenging part of this project was troubleshooting Docker in GitHub Codespaces.
Initially, the Codespace entered recovery mode because of container configuration issues.
Although Docker commands were installed, Docker could not connect to the daemon.

As a result:
Docker image builds failed
Docker Compose could not start containers
After reviewing the devcontainer configuration, rebuilding the Codespace environment, and validating Docker daemon connectivity, I successfully resolved the issue.
This experience improved my troubleshooting skills and deepened my understanding of Docker architecture.

Stopping and Cleaning Up
After completing verification and testing, I stopped the environment using:
docker compose down

This command:
Stops containers
Removes containers
Removes Docker networks
Free system resources

Cleaning up environments is an important DevOps practice.

Key Lessons Learned

This project taught me several valuable DevOps concepts:
Microservices architecture
Containerization with Docker
Service discovery using Eureka
Centralized configuration management
Observability using Prometheus, Grafana, and Zipkin
Troubleshooting Docker environments
Deploying and managing multi-container applications

Most importantly, I learned that successful DevOps work involves not only deployment but also monitoring, troubleshooting, and maintaining system reliability.

DMI Cohort 2 Experience
This project was completed as part of DMI Cohort 2.
The hands-on nature of the program provided practical experience with real-world DevOps tools and deployment workflows.

If you're interested in learning DevOps through practical projects, DMI Cohort 3 registration is open:
https://docs.google.com/forms/d/e/1FAIpQLSel7ai7nyb0P1qLW4vEyfB_nEsD4lUF1XG88vmAaFGBOb6hPA/viewform
Thank you for reading, and happy learning!