Simple springboot REST API to use at the aws white belt trainning
360
This Docker image encapsulates a Spring-based microservice application known as the Greeting API. The API connects to a MySQL database to fetch, create, update, and delete greetings. The endpoints, data schemas, and detailed operations are specified according to the OpenAPI 3.0.0 specification.
brnnai/greeting-service:taggreeting-api InstanceStarting a greeting-api instance is as simple as running the following command. Be sure to replace your_username and tag with your Docker username and the image tag:
docker run --name service-greeting-api -d brnnai/greeting-service:latest
You can customize this Docker image using several environment variables:
You can set these variables using the -e flag in the docker run command:
docker run -d --name greeting-api \
-e SPRING_DATASOURCE_URL=jdbc:mysql://localhost:3306/greetingsdb \
-e DATASOURCE_USERNAME=root \
-e DATASOURCE_PASSWORD=mypassword \
-e LOG_LEVEL=INFO \
-p 8080:8080 \
brnnai/greeting-service:latest
The application listens on port 8080 for HTTP traffic. You can map this to any port on your host machine using the -p flag in the docker run command.
This application requires a MySQL server to function correctly. The SPRING_DATASOURCE_URL environment variable should point to a running MySQL server instance.
Content type
Image
Digest
sha256:175c3e394…
Size
263.6 MB
Last updated
over 3 years ago
docker pull brnnai/greeting-service