🐳 Containerized Microservices Deployment

11 Microservices | Docker Compose | Production-Ready Architecture

Docker Containerization Architecture

Project Overview

This project demonstrates a production-ready containerized deployment of the Google Online Boutique e-commerce platform using Docker Compose. The implementation features 11 interconnected microservices orchestrated through a custom bridge network, with sophisticated dependency management, environment configuration, and port mapping strategies. The architecture showcases modern containerization practices with Redis caching, service discovery, and inter-service communication patterns.

🏗️ Architecture Highlights

  • ✅ 11 containerized microservices with optimized resource allocation
  • ✅ Custom bridge network (butice-net) for secure inter-service communication
  • ✅ Redis caching layer for shopping cart persistence
  • ✅ Sophisticated dependency management and startup ordering
  • ✅ Strategic port mapping to avoid conflicts and enable external access
  • ✅ Environment-driven configuration for production deployment
  • ✅ Multi-language support across containerized services

🐳 Container Architecture

Network Topology

🌐

butice-net Bridge Network

Custom Docker bridge network enabling secure inter-service communication with built-in DNS resolution and service discovery

Service Deployment Matrix

🗄️ Redis Cache

:6379

In-memory data store for cart persistence and session management

Cache Layer No Dependencies

🛒 Cart Service

:7070

C# service managing shopping cart operations with Redis backend

C# Depends: Redis

📦 Product Catalog

:3550

Go service providing product information and catalog management

Go Core Service

🚚 Shipping Service

:50051

Go service calculating shipping costs and delivery estimates

Go gRPC

💳 Payment Service

:50052

Go service handling payment processing with conflict-free port mapping

Go Port Mapped

💱 Currency Service

:7000

Node.js service providing currency conversion capabilities

Node.js Utility

📧 Email Service

:8081

Python service managing email notifications and confirmations

Python Communication

🎯 Recommendation

:8082

Python ML service providing personalized product recommendations

Python ML/AI

🛍️ Checkout Service

:5050

Go orchestration service coordinating the entire checkout process

Go Orchestrator

📢 Ad Service

:9555

Java service serving contextual advertisements

Java Marketing

🌐 Frontend

:8080

Node.js web interface orchestrating all backend services

Node.js Web UI

🔧 Technical Implementation

Docker Compose Strategy

🏗️ Service Orchestration

  • Dependency-based startup ordering
  • Health check integration
  • Graceful shutdown handling
  • Resource constraint management

🌐 Network Architecture

  • Custom bridge network isolation
  • Internal DNS resolution
  • Service-to-service communication
  • Port conflict resolution

⚙️ Configuration Management

  • Environment variable injection
  • Service endpoint discovery
  • Runtime configuration
  • Secrets management ready

📊 Monitoring & Scaling

  • Container resource monitoring
  • Horizontal scaling preparation
  • Log aggregation setup
  • Performance optimization

Service Dependencies & Communication

Level 1: Infrastructure

Redis

Level 2: Core Services

Cart Service Product Catalog Shipping Payment Currency Email Ad Service

Level 3: Business Logic

Recommendation Checkout

Level 4: User Interface

Frontend

🚀 Production Deployment Features

🔒
Network Isolation
Custom bridge network ensures secure inter-service communication
Smart Port Mapping
Conflict-free port allocation with external access control
🔄
Dependency Management
Orchestrated startup sequence based on service dependencies
📊
Performance Optimization
Redis caching and optimized container resource allocation
🌍
Environment Flexibility
Configurable service endpoints and runtime parameters
🔧
Maintenance Ready
Individual service updates without system-wide disruption

🏭 Container Registry & Images

Docker Hub Integration

All microservice images are hosted on Docker Hub under the prasannakumarsinganamalla431 namespace, enabling:

  • Centralized Image Management: Single source of truth for all container images
  • Version Control: Tagged releases with semantic versioning
  • Automated Pulls: Docker Compose automatically pulls latest images
  • Cross-Platform Deployment: Architecture-agnostic container distribution
  • CI/CD Integration: Seamless integration with build pipelines

Image Repository Structure

prasannakumarsinganamalla431/
├── adservice:latest
├── cartservice:latest
├── checkoutservice:latest
├── currencyservice:latest
├── emailservice:latest
├── frontend:latest
├── paymentservice:latest
├── productcatalogservice:latest
├── recommendationservice:latest
└── shippingservice:latest

⚙️ Configuration Highlights

Environment Variables Strategy

🛒 Cart Service Configuration

REDIS_ADDR=redis:6379

Connects to Redis instance for cart persistence

🛍️ Checkout Service Orchestration

PAYMENT_SERVICE_ADDR=paymentservice:50051
CART_SERVICE_ADDR=cartservice:7070
CURRENCY_SERVICE_ADDR=currencyservice:7000

Multi-service coordination for checkout process

🌐 Frontend Service Discovery

PRODUCT_CATALOG_SERVICE_ADDR=productcatalogservice:3550
RECOMMENDATION_SERVICE_ADDR=recommendationservice:8080
AD_SERVICE_ADDR=adservice:9555

Complete service mesh integration for web interface

🧠 Key Learnings & Achievements

  • Architected a production-ready containerized microservices platform using Docker Compose
  • Implemented sophisticated service dependency management and startup orchestration
  • Designed custom bridge networking for secure inter-service communication
  • Optimized port mapping strategy to eliminate conflicts while maintaining accessibility
  • Integrated Redis caching layer for enhanced performance and data persistence
  • Mastered multi-language containerization across Go, Java, Node.js, Python, and C#
  • Developed environment-driven configuration management for deployment flexibility
  • Created scalable architecture supporting horizontal scaling and load distribution
  • Established Docker Hub integration for centralized image management
  • Implemented production-ready container orchestration patterns

🚀 Deployment Commands

Start the Complete Platform

docker-compose up -d

Launches all 11 services in detached mode with dependency resolution

Scale Individual Services

docker-compose up -d --scale frontend=3

Horizontal scaling of frontend service for load distribution

Monitor Service Health

docker-compose ps

Real-time status monitoring of all containerized services

Work Samples

Docker Containers

Container Deployment

5 images