Skip to content

daflockinger/heureka

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Heureka - Simple Eureka Server for Docker

A simple eureka server with the possibility to have 2 peers running that are aware of each other (server failover). For the peers the hosts and the ports can be specified.

The docker image can be found on: https://hub.docker.com/r/daflockinger/heureka/

The docker can be started with either by creating it from the source:

mvn clean package docker:build 

or by pulling the latest from the docker hub:

docker pull daflockinger/heureka

and started with:

docker run -d daflockinger/heureka

For peers add this to the docker run command:

 -Dspring.profiles.active=peer1
 -Dspring.profiles.active=peer2
 -Dspring.profiles.active=peer3

All 3 instances can be started with docker compose:

cd heureka/
docker-compose up

The peers hostname and port can be configured with adding these environment variables to the docker:

Path Description
PEER1_PORT Port of the first peer (default is 8761)
PEER1_HOSTNAME Hostname of the first peer (default is 'peer1')
PEER2_PORT Port of the second peer (default is 8762)
PEER2_HOSTNAME Hostname of the second peer (default is 'peer2')
PEER3_PORT Port of the second peer (default is 8763)
PEER3_HOSTNAME Hostname of the second peer (default is 'peer3')

Packages

No packages published

Languages

  • Shell 52.6%
  • Batchfile 35.4%
  • Java 12.0%