Skip to content

config-repo

centralised config repo

Overview

Complete Configuration Repository Structure
config-repo/
β”œβ”€β”€ application.yml                  # Global defaults
β”œβ”€β”€ shared/
β”‚   β”œβ”€β”€ base/
β”‚   β”‚   └── application.yml          # 🟒 Base profile (inherited by all)
β”‚   β”œβ”€β”€ postgres.yml                 # πŸ—ƒοΈ PostgreSQL configs
β”‚   β”œβ”€β”€ rabbitmq.yml                 # πŸ‡ RabbitMQ configs
β”‚   β”œβ”€β”€ elasticsearch.yml            # πŸ” Elasticsearch configs
β”‚   β”œβ”€β”€ redis.yml                    # πŸ›‘ Redis configs
β”‚   β”œβ”€β”€ monitoring.yml               # πŸ“Š Prometheus/Grafana/Loki
β”‚   └── vault.yml                    # πŸ” Vault integration
β”‚
β”œβ”€β”€ πŸ‘€ appointment-service/          # Appointment Management
β”‚   β”œβ”€β”€ application.yml              # Appointment config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local scheduling
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT scheduling
β”‚   └── application-prod.yml         # 🏭 Production scheduling
β”‚
β”œβ”€β”€ πŸ’Ό business-service/             # Business Operations
β”‚   β”œβ”€β”€ application.yml              # Business logic config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local mode
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT mode
β”‚   └── application-prod.yml         # 🏭 Production mode
β”‚
β”œβ”€β”€ πŸ’³ accounting-service/           # Accounting & Finance
β”‚   β”œβ”€β”€ application.yml              # Accounting config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Mock transactions
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT transactions
β”‚   └── application-prod.yml         # 🏭 Live transactions
β”‚
β”œβ”€β”€ βš™οΈ config-service/               # Config Server
β”‚   β”œβ”€β”€ application.yml              # Git repo config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Filesystem backend
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ Git UAT repo
β”‚   └── application-prod.yml         # 🏭 Git prod + Vault
β”‚
β”œβ”€β”€ πŸ‘₯ crm-service/                  # Customer Relationship Management
β”‚   β”œβ”€β”€ application.yml              # CRM config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local customer data
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT customer data
β”‚   └── application-prod.yml         # 🏭 Live customer data
β”‚
β”œβ”€β”€ 🚚 delivery-service/             # Delivery Management
β”‚   β”œβ”€β”€ application.yml              # Delivery config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local tracking
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT tracking
β”‚   └── application-prod.yml         # 🏭 Live tracking
β”‚
β”œβ”€β”€ πŸ” discovery-service/            # Service Discovery
β”‚   β”œβ”€β”€ application.yml              # Registry config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Standalone mode
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ Cluster mode
β”‚   └── application-prod.yml         # 🏭 Multi-zone deployment
β”‚
β”œβ”€β”€ πŸ“„ document-service/             # Document Management
β”‚   β”œβ”€β”€ application.yml              # Document config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local storage
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT storage
β”‚   └── application-prod.yml         # 🏭 Live storage
β”‚
β”œβ”€β”€ πŸ›οΈ ecommerce-service/            # E-commerce
β”‚   β”œβ”€β”€ application.yml              # E-commerce config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Mock catalog
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT catalog
β”‚   └── application-prod.yml         # 🏭 Live catalog
β”‚
β”œβ”€β”€ 🌐 gateway-service/              # API Gateway
β”‚   β”œβ”€β”€ application.yml              # Inherits shared/base
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local dev (Port 8080, no auth)
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT (Port 8080, UAT DB)
β”‚   └── application-prod.yml         # 🏭 Prod (HTTPS, prod DB)
β”‚
β”œβ”€β”€ 🏨 hotel-service/                # Hotel Management
β”‚   β”œβ”€β”€ application.yml              # Hotel config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local bookings
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT bookings
β”‚   └── application-prod.yml         # 🏭 Live bookings
β”‚
β”œβ”€β”€ πŸ“š knowledge-base/               # Knowledge Base
β”‚   β”œβ”€β”€ application.yml              # Knowledge base config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local articles
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT articles
β”‚   └── application-prod.yml         # 🏭 Live articles
β”‚
β”œβ”€β”€ βœ‰οΈ notification-service/         # Notifications
β”‚   β”œβ”€β”€ application.yml              # Delivery config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Log to console
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ Send to test envs
β”‚   └── application-prod.yml         # 🏭 Production SMTP
β”‚
β”œβ”€β”€ πŸ’° payment-service/              # Payment Processing
β”‚   β”œβ”€β”€ application.yml              # Base transaction configs
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ H2 database, mock mode
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ Sandbox payment gateway
β”‚   └── application-prod.yml         # 🏭 PCI-DSS compliant
β”‚
β”œβ”€β”€ πŸ” search-service/               # Search & Indexing
β”‚   β”œβ”€β”€ application.yml              # Search config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Local indices
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT indices
β”‚   └── application-prod.yml         # 🏭 Live indices
β”‚
β”œβ”€β”€ ☎️ telephony-service/            # Telephony & Communications
β”‚   β”œβ”€β”€ application.yml              # Telephony config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ Mock calls
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ UAT calls
β”‚   └── application-prod.yml         # 🏭 Live calls
β”‚
β”œβ”€β”€ πŸ‘₯ user-service/                 # User Management
β”‚   β”œβ”€β”€ application.yml              # Auth config
β”‚   β”œβ”€β”€ application-local.yml        # πŸ–₯️ In-memory auth
β”‚   β”œβ”€β”€ application-uat.yml          # πŸ§ͺ LDAP integration
β”‚   └── application-prod.yml         # 🏭 OAuth2 + MFA
β”‚
└── πŸ’³ wallet-service/               # Digital Wallet
    β”œβ”€β”€ application.yml              # Wallet config
    β”œβ”€β”€ application-local.yml        # πŸ–₯️ Fake balances
    β”œβ”€β”€ application-uat.yml          # πŸ§ͺ Test blockchain
    └── application-prod.yml         # 🏭 Real transactions

Shared Configurations

The shared/ directory contains configurations that are shared across all services:

  • PostgreSQL (postgres.yml): Contains database credentials and service-specific database names (e.g., service-name-db).
  • RabbitMQ (rabbitmq.yml): Defines two queues per service (main queue and dead letter queue).
  • Elasticsearch (elasticsearch.yml): Configures unique indices for each service (e.g., service-name-{env:local}).
  • Redis (redis.yml): Shared Redis configurations.
  • Monitoring (monitoring.yml): Includes configurations for Grafana, Loki, and Prometheus.
  • Vault (vault.yml): HashiCorp Vault configurations for secure secret management.

Environment-Specific Configurations

Each service has the following environment-specific configuration files:

  • application-local.yml: Local development environment.
  • application-uat.yml: User Acceptance Testing (UAT) environment.
  • application-prod.yml: Production environment.

How to Use

  1. Spring Cloud Config Server: Point your Spring Cloud Config Server to this repository to serve configurations to your microservices.
  2. Environment Variables: Use environment variables to override sensitive values (e.g., database credentials, API keys).
  3. Shared Configurations: Leverage the shared/ directory for common configurations across services.

Monitoring and Observability

The repository includes configurations for monitoring and observability tools:

  • Grafana: Dashboard configurations for visualizing metrics.
  • Loki: Centralized logging configurations.
  • Prometheus: Metrics scraping configurations.

Security

  • HashiCorp Vault: Securely manage secrets such as database credentials, API keys, and tokens.

Contributing

Feel free to contribute to this repository by adding new configurations or improving existing ones. Ensure that all changes are tested in the appropriate environments.


This repository is a critical part of the infrastructure and ensures consistent and centralized configuration management for all microservices.