Sign inSign up

akgarg0472/urlshortener-eureka-discovery-server

By akgarg0472

•Updated almost 2 years ago

Eureka Discovery Server for URL Shortener, enabling micro services registry and discovery.

Image
Networking
0

932

akgarg0472/urlshortener-eureka-discovery-server repository overview

⁠Eureka Discovery Server

This Docker image provides a Spring Boot-based Eureka Discovery Server for the URL Shortener project. It serves as a service registry, enabling microservices to dynamically register and discover each other, facilitating a robust and scalable distributed system.

⁠Key Features:
  • Service Registry: Enables microservices to dynamically register and discover services.
  • Spring Boot-Based: Simplified configuration and integration with Spring Cloud applications.
  • Environment Configurable: Adjust server settings, logging, and behavior via environment variables.
  • Dockerized: Ready for containerized deployment in Docker environments.
  • Scalable Architecture: Supports dynamic service discovery in a distributed system.
⁠Usage:
  1. Pull the Docker Image:

    To begin, pull the Docker image from Docker Hub:

    docker pull akgarg0472/urlshortener-eureka-discovery-server:latest
    
  2. Run the Docker Container:

    After pulling the image, you can run the Eureka Discovery Server in a Docker container using the following command:

    docker run -d \
    -p 8761:8761 \
    -e EUREKA_LOG_PATH=/tmp/logs/discovery \
    -e EUREKA_LOG_LEVEL=INFO \
    -e EUREKA_LOGGER_REF=consoleLogger \
    -e EUREKA_SERVER_LOG_LEVEL=DEBUG \
    -v /host/path/to/logs:/tmp/logs/ \
    --network=host \
    --name eureka-server \
    akgarg0472/urlshortener-eureka-discovery-server:latest
    

    This will:

    • Run the container in detached mode (-d).
    • Map port 8761 from the container to the host.
    • Set up logging with environment variables (EUREKA_LOG_PATH, EUREKA_LOG_LEVEL, EUREKA_LOGGER_REF, EUREKA_SERVER_LOG_LEVEL).
    • Bind the host directory for logs using -v.
    • Run the container on the host network (--network=host).
  3. Access the Eureka Discovery Server:

    Once the container is running, you can access the Eureka Discovery Server via your browser at:

    http://localhost:8761
    
  4. Configuration Options:

    You can customize the container's behavior by passing environment variables when you run the container. The available options are:

    • EUREKA_LOG_PATH: Specify the path where logs should be stored.
    • EUREKA_LOG_LEVEL: Set the log verbosity level (e.g., INFO, DEBUG).
    • EUREKA_LOGGER_REF: Choose the log output type (consoleLogger or fileLogger).
    • EUREKA_SERVER_LOG_LEVEL: Set the log verbosity level for Eureka-specific logs.

For more details or customization, you can refer to the GitHub repository⁠.

Tag summary

Content type

Image

Digest

sha256:0d6b1989d…

Size

121.3 MB

Last updated

almost 2 years ago

docker pull akgarg0472/urlshortener-eureka-discovery-server