Docker Compose

Detailed breakdown of the four core infrastructure stacks with images, healthchecks, and volumes.

Infrastructure Stacks

The Arya Banking platform is orchestrated via four modular Docker Compose files located in the compose/ directory of arya-banking-infra. All services join the external arya-banking-net network.


1. Event Streaming (kafka.yml)

Provides the Apache Kafka backbone for event-driven communication.

This stack runs Kafka in KRaft mode (single node: broker + controller), eliminating the need for a separate Zookeeper ensemble. Cluster ID: 383d9e96-76e1-4441-bc4a-2102308d5e31.

ServiceImageHost PortHealthcheck
Kafkaconfluentinc/cp-kafka:latest9092 (external) / 29092 (internal)kafka-broker-api-versions (10s/10s, 10 retries, 30s start)
Schema Registryconfluentinc/cp-schema-registry:latest8081—
Kafka Connectconfluentinc/cp-kafka-connect:latest8083—
Kafka UI (Kafbat)ghcr.io/kafbat/kafka-ui:latest8080—

Listener Architecture

Kafka is configured with multiple listeners to support both internal (container) and external (host) clients:

  • PLAINTEXT_INTERNAL: kafka:29092 (used by Docker microservices)
  • PLAINTEXT_EXTERNAL: localhost:9092 (used for local IDE debugging)
  • CONTROLLER: kafka:9093 (KRaft controller quorum, single node 1@kafka:9093)

Kafka Connect

  • Group: compose-connect-group
  • Internal topics: _connect_configs, _connect_offset, _connect_status (RF=1)
  • Key/Value converters: StringConverter (external), JsonConverter (internal)
  • Schema Registry URL: http://schema-registry:8081

Kafka UI (Kafbat)

  • Cluster name: banking-local, Schema Registry + Kafka Connect linked
  • URL: http://localhost:8080

Volumes

kafka-data (/var/lib/kafka/data), schema-data, pgdata (named volumes).


2. Identity & Access (keycloak.yml)

Handles Authentication and Authorization via Keycloak 26.

ServiceImageHost PortNotes
PostgreSQLpostgres:155432DB/user/pass: keycloak/keycloak/keycloakpass
Keycloakquay.io/keycloak/keycloak:26.0.25433 → 8080start-dev mode, admin/admin bootstrap
🔒

Keycloak is configured with Argon2id password hashing by default. This is the current OWASP-recommended algorithm for secure credential storage.

Volumes & Data

  • postgres-data (host bind ./postgres-data) — PostgreSQL persistence
  • keycloak-data (host bind ./keycloak-data) — realm export/import artifacts

3. Secrets Management (vault.yml)

Secures sensitive configuration (DB passwords, client secrets) using HashiCorp Vault.

  • Image: hashicorp/vault:1.21
  • Mode: File storage (vault server -config=vault/config/vault.hcl), ui = true, tls_disable = 1
  • UI: Enabled at http://localhost:8091/ui
  • Port: 8091 -> 8200
  • Capabilities: cap_add: IPC_LOCK
  • Volumes: ./vault/data, ./vault/config

Vault starts in a sealed state. It must be manually unsealed after every container restart via make vault-unseal (initialized with 5 secret shares / threshold 3).


4. Platform Services (platform.yml)

Orchestrates the Spring Cloud infrastructure components (images published to Docker Hub as karthikulkarni/arya-banking-*).

ServiceImagePortHealthcheck / Depends
Service Registrykarthikulkarni/arya-banking-service-registry:latest8761restart unless-stopped
Config Serverkarthikulkarni/arya-banking-config-server:latest8090curl -f localhost:8090/actuator/health (10s/5s/5 retries)
API Gatewaykarthikulkarni/arya-banking-api-gateway:latest8085waits for config-server healthy

Environment Variables

ServiceVariableValue
Config ServerSPRING_PROFILES_ACTIVEdefault
Config ServerEUREKA_CLIENT_SERVICEURL_DEFAULTZONEhttp://service-registry:8761/eureka/
API GatewaySPRING_CLOUD_CONFIG_URIhttp://config-server:8090
API GatewayAPP_CONFIG_KEYCLOAK_URLhttp://keycloak:8080
API GatewayEUREKA_CLIENT_SERVICEURL_DEFAULTZONEhttp://service-registry:8761/eureka/

Network Map

All services are joined to the arya-banking-net network: