Skip to main content

Welcome to SGIVU Config Repository

The SGIVU Config Repository is the centralized configuration management system for the SGIVU microservices ecosystem. It serves as the single source of truth for all service configurations across development, production, and other environments.

Quick Setup

Get started with the config repository in minutes

Architecture

Understand the Spring Cloud Config architecture

Service Configurations

Explore individual microservice configurations

Environment Management

Manage dev, prod, and custom environments

What is SGIVU Config Repository?

This repository contains YAML configuration files that are consumed by the Spring Cloud Config Server (sgivu-config). Each microservice in the SGIVU ecosystem retrieves its configuration from this centralized location, enabling:
  • Version Control: Track all configuration changes through Git history
  • Environment Separation: Maintain distinct configurations for dev, prod, and other environments
  • Consistency: Ensure all services use coordinated configuration values
  • Security: Centralize secret management with environment variable placeholders

Key Features

Multi-Environment

Support for default, dev, and prod profiles with override capabilities

Spring Cloud Native

Seamless integration with Spring Cloud Config Server

OAuth2 Ready

Pre-configured OAuth2 authorization server setup

Service Discovery

Eureka service registry configuration included

Database Migrations

Flyway migration settings for all data services

Observability

Distributed tracing with Zipkin and health monitoring

Architecture Overview

The config repository follows Spring Cloud Config’s naming convention:
{application-name}.yml          # Base configuration
{application-name}-{profile}.yml # Environment-specific overrides
Each microservice fetches its configuration at startup by requesting:
  • Base configuration from {application-name}.yml
  • Profile-specific overrides from {application-name}-{profile}.yml
Configuration values can be refreshed without service restarts using Spring Cloud Bus and the /actuator/refresh endpoint.

Microservices Configured

The repository manages configuration for these SGIVU services:
ServicePortPurpose
sgivu-discovery8761Eureka service registry
sgivu-auth9000OAuth2 authorization server
sgivu-gateway8080API gateway and session management
sgivu-user8081User management service
sgivu-client8082Client management service
sgivu-vehicle8083Vehicle management with S3 integration
sgivu-purchase-sale8084Purchase and sale orchestration

Getting Started

1

Clone the repository

Clone this config repository to your local machine
git clone https://github.com/stevenrq/sgivu-config-repo.git
cd sgivu-config-repo
2

Set up Config Server

Configure your Spring Cloud Config Server to point to this repository
spring:
  cloud:
    config:
      server:
        git:
          uri: https://github.com/stevenrq/sgivu-config-repo
3

Configure environment variables

Set required environment variables for secrets and environment-specific values
export REDIS_PASSWORD=your_redis_password
export SGIVU_GATEWAY_SECRET=your_gateway_secret
export SERVICE_INTERNAL_SECRET_KEY=your_internal_secret
4

Start services

Launch your microservices with the appropriate Spring profile
java -jar sgivu-auth.jar --spring.profiles.active=dev

Next Steps

Local Development Setup

Configure your local development environment

Security Best Practices

Learn about secret management and security

Configuration Reference

Explore common Spring configuration patterns

Operations Guide

Monitor and maintain your configuration

Build docs developers (and LLMs) love