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).
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
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.
# From compose/platform.yml
service-registry:
image: karthikulkarni/arya-banking-service-registry:latest
container_name: service-registry
ports:
- "8761:8761"
networks:
- arya-banking-net
Environment Variables
When running via Docker Compose or in production, you can override default settings using environment variables.
| Variable | Default & Purpose |
|---|---|
SERVER_PORT | 8761 — Overrides server.port at runtime |
SPRING_PROFILES_ACTIVE | default — Activates a named Spring profile |
JAVA_OPTS | (empty) — Pass JVM memory flags e.g. -Xms256m -Xmx512m |
EUREKA_CLIENT_SERVICEURL_DEFAULTZONE | http://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.