tree: e1c30bd5854f8160e7b5f8ae731c821120c307fa [path history] [tgz]
  1. hello-world-chart/
  2. src/
  3. .gitignore
  4. build.sh
  5. container-tag.yaml
  6. docker-compose.yml
  7. Dockerfile
  8. hello-world-build-start.sh
  9. pom.xml
  10. README.md
sample-services/hello-world/README.md

Hello World Service

This repository contains a Spring Boot application serving a Hello World endpoint. The application can be built and run using the provided script - hello-world-build-start.sh.

Prerequisites

  • Docker installed on your machine.

Building and Running the Application

Run the script:

  ./hello-world-build-start.sh

The script will build a Docker image and run a container with the Hello World service. After the container starts, wait for a few seconds to ensure the Spring Boot application is fully initialized. Next, it will make an HTTP request to the Hello World endpoint and display the response:

  response=$(curl -s http://localhost:8080/helloworld/v1)
  echo "Response from the Hello World endpoint:"
  echo "$response"

To stop and remove the Docker container:

  docker stop hello-world
  docker rm hello-world

Additional Information