{"id":23034815,"url":"https://github.com/m-thirumal/eureka-server","last_synced_at":"2025-08-14T17:30:37.688Z","repository":{"id":50437754,"uuid":"243529715","full_name":"m-thirumal/eureka-server","owner":"m-thirumal","description":"Production-ready Spring Cloud: High Availability - Eureka Server","archived":false,"fork":false,"pushed_at":"2024-05-22T11:08:42.000Z","size":573,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-22T11:35:23.749Z","etag":null,"topics":["eureka-discovery-service","eureka-server","eureka-service-discovery","java","spring-boot","spring-boot-admin"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/m-thirumal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-27T13:45:59.000Z","updated_at":"2024-05-29T11:06:29.564Z","dependencies_parsed_at":"2023-12-03T16:21:36.178Z","dependency_job_id":"ca8cf64d-bbfb-4044-96bf-f87479525672","html_url":"https://github.com/m-thirumal/eureka-server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thirumal%2Feureka-server","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thirumal%2Feureka-server/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thirumal%2Feureka-server/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/m-thirumal%2Feureka-server/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/m-thirumal","download_url":"https://codeload.github.com/m-thirumal/eureka-server/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229845289,"owners_count":18133242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["eureka-discovery-service","eureka-server","eureka-service-discovery","java","spring-boot","spring-boot-admin"],"created_at":"2024-12-15T16:36:04.108Z","updated_at":"2024-12-15T16:36:05.069Z","avatar_url":"https://github.com/m-thirumal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Eureka-server \n\n* [Eureka Server](http://localhost:8761) high availability (HA) for Production\n\n\n\u003cimg src=\"HA-eureka.png\" alt=\"HA-eureka.png\"/\u003e\n\n### Dependent project\n\n* [Spring boot admin server](https://github.com/M-Thirumal/spring-boot-admin-server)\n\n## To Create jar\n\n\tmvn clean install\n\t\n\tmvn clean package -DskipTests=true\n\n## Run as jar from terminal\n\n\tjava -jar target/eureka-server-0.0.1-SNAPSHOT.jar\n\t\n\tjava -jar -Dspring.profiles.active=DEV-PRIMARY target/eureka-server-0.0.1-SNAPSHOT.jar\n\t\n\tjava -jar -Dspring.profiles.active=DEV-SECONDARY target/eureka-server-0.0.1-SNAPSHOT.jar\n\t\n\tjava -jar -Dspring.profiles.active=DEV-TERTIARY target/eureka-server-0.0.1-SNAPSHOT.jar\n\t\n## Docker\n\nCreate docker layered image using the following command\n\n\tmvn package\n\tchmod -R 777 target/\n\tmkdir -p target/dependency \u0026\u0026 (cd target/dependency; jar -xf ../*.jar)\n\tchmod -R 777 target/\n\tdocker build -t eureka-server .\n\nRun the image (with desired)\n\n\tdocker run --name primary --restart always -d -p 8761:8761 -e \"SPRING_PROFILES_ACTIVE=DEV-PRIMARY\" eureka-server\n\tdocker run --name secondary --restart always -d -p 8762:8762 -e \"SPRING_PROFILES_ACTIVE=DEV-SECONDARY\" eureka-server\n\tdocker run --name tertiary --restart always -d -p 8763:8763 -e \"SPRING_PROFILES_ACTIVE=DEV-TERTIARY\" eureka-server\n\t\n\t# With local log\n\t\n\tdocker run --name primary --restart always --log-driver local --log-opt max-size=10m -d -p 8761:8761 -e \"SPRING_PROFILES_ACTIVE=DEV-PRIMARY\" eureka-server\n\tdocker run --name secondary --restart always --log-driver local --log-opt max-size=10m -d -p 8762:8762 -e \"SPRING_PROFILES_ACTIVE=DEV-SECONDARY\" eureka-server\n\tdocker run --name tertiary --restart always --log-driver local --log-opt max-size=10m -d -p 8763:8763 -e \"SPRING_PROFILES_ACTIVE=DEV-TERTIARY\" eureka-server\n\t\n\t# Without log\n\tdocker run --name primary --restart always --log-driver none -d -p 8761:8761 -e \"SPRING_PROFILES_ACTIVE=DEV-PRIMARY\" eureka-server\n\tdocker run --name secondary --restart always --log-driver none -d -p 8762:8762 -e \"SPRING_PROFILES_ACTIVE=DEV-SECONDARY\" eureka-server\n\tdocker run --name tertiary --restart always --log-driver none -d -p 8763:8763 -e \"SPRING_PROFILES_ACTIVE=DEV-TERTIARY\" eureka-server\n\t\n\t# If we use ${\"HOST\"} for ip-address\n\tdocker run --name primary --restart always -d -p 8761:8761 -e \"SPRING_PROFILES_ACTIVE=DEV-PRIMARY\" -e \"HOST=172.19.250.7\" eureka-server\n\tdocker run --name secondary --restart always -d -p 8762:8762 -e \"SPRING_PROFILES_ACTIVE=DEV-SECONDARY\" -e \"HOST=172.19.250.8\" eureka-server\n\tdocker run --name tertiary --restart always -d -p 8763:8763 -e \"SPRING_PROFILES_ACTIVE=DEV-TERTIARY\" -e \"HOST=172.19.250.9\" eureka-server\n\t\n### Start EUREKA as JAR at OS boot automatically\n\nAdd the below line in `crontab -e`\n\t\n\t@reboot /{path-to-eureka-server-script}/eureka-server.sh {ENV}\n\nExample:\n\t\n\t@reboot /home/thirumal/git/eureka-server/eureka-server.sh DEV-PRIMARY\n\t\nNote: Add `cd /path-to-repo` to the shell script (1'st line)\n\t\n### Replica \n\n* Make sure `eureka.instance.hostname: ` is same as `eureka.client.serviceUrl.defaultZone`. Check how it's configured in `PRO environment`\n* If you want some of cluster to be independent set `eureka.client.fetchRegistry` is `false`. That is, don't want to fetch details from other cluster. Check `UDEV` environment `UDEV-SECONDARY`\n\t\n### Swagger UI\n\n[http://localhost:8761/swagger-ui/index.html](http://localhost:8761/swagger-ui/index.html)\n[http://localhost:8761/api-docs](http://localhost:8761/api-docs)\n\n### Credentials\n\n\tthirumal:thirumal\n\n### Extras - PROMETHEUS(Run the following docker command in the `prometheus.yml`file directory.\n\n\n    [http://localhost:8761/actuator/prometheus](Prometheus actuator endpoint)    \n\n    docker run -d -p 9090:9090 -v /Users/thirumal/git/eureka-server/prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus\n\t\n\n## Troubleshoot\n\n1. Client registering with `Public IP address` instead of private.\n\t* Solution: Need to hard code the IP address. Example\n\t\t\n\t\teureka:\n\t\t  instance:\n\t\t    prefer-ip-address : true\n\t\t    ip-address : xx.xx.xx.xx\n\t","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-thirumal%2Feureka-server","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fm-thirumal%2Feureka-server","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fm-thirumal%2Feureka-server/lists"}