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
- Spring Cloud Config Server: Point your Spring Cloud Config Server to this repository to serve configurations to your microservices.
- Environment Variables: Use environment variables to override sensitive values (e.g., database credentials, API keys).
- 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.