Configuration Reference

Application properties, environment variables, and Docker settings for the Service Registry.

Application Configuration (application.yaml)

The Eureka server requires specific properties to operate in standalone mode (preventing it from trying to register with itself).

Yaml code-highlight
server:
  port: 8761

eureka:
  client:
    service-url:
      defaultZone: http://localhost:8761/eureka
    register-with-eureka: false   # Critical for standalone mode
    fetch-registry: false         # Saves memory, prevents self-loop

spring:
  application:
    name: arya-banking-service-registry
}} **Cluster Readiness:** Currently configured for single-node standalone mode. To run a clustered Eureka pair, add a second Spring profile with each node's `defaultZone` pointing to the other node's URL and set `register-with-eureka: true`.

Platform Stack Integration

When running as part of the full platform stack via arya-banking-infra/compose/platform.yml, the Service Registry is the first container to start. The Config Server and API Gateway depend on it.

Yaml code-highlight
# From compose/platform.yml
service-registry:
  image: karthikulkarni/arya-banking-service-registry:latest
  container_name: service-registry
  ports:
    - "8761:8761"
  networks:
    - arya-banking-net
Refer to the [Infrastructure → Docker Compose](/docs/infra/docker-compose/) page for the complete platform.yml configuration.

Environment Variables

When running via Docker Compose or in production, you can override default settings using environment variables.

VariableDefault & Purpose
SERVER_PORT8761 — Overrides server.port at runtime
SPRING_PROFILES_ACTIVEdefault — Activates a named Spring profile
JAVA_OPTS(empty) — Pass JVM memory flags e.g. -Xms256m -Xmx512m
EUREKA_CLIENT_SERVICEURL_DEFAULTZONEhttp://localhost:8761/eureka — Peer URL in cluster mode

Dockerfile Build Stages

The Service Registry uses a multi-stage Dockerfile to minimize the runtime footprint.

Uses maven:3.9.4-eclipse-temurin-17. Downloads dependencies via pom.xml layer caching, then copies src/ and runs mvn -B -DskipTests package to generate the fat JAR.