Sign inSign up

kunupat/foo

By kunupat

•Updated almost 7 years ago

A Spring Boot Rest Service with four endpoints.

Image
0

219

kunupat/foo repository overview

⁠A Spring Boot Rest Service with four endpoints

⁠Source Code

https://github.com/kunupat/foo⁠

⁠Docker Run

bar.service.base.url and external.service.url properties can be overridden using Docker environment variables. E.g. (default values shown for below properties):

  • bar.service.base.url=http://localhost:8081
  • external.service.url=http://dummy.restapiexample.com/api/v1/employees

E.g. sudo docker run -m 0.25g -p 8080:8080 -e bar.service.base.url=[bar-service-base-url] -e external.service.url=[external-service-url] --rm -d --name foo.service.api kunupat/foo

⁠Endpoints

  1. /data : Calls bar service⁠ endpoint: /data
  2. /static: Responds with a static message
  3. /external: Calls an external service
  4. /actuator/health : A health check endpoint

⁠URLs

  • port: 8080
  • http://localhost:8080/data
  • http://localhost:8080/static
  • http://localhost:8080/external
  • http://localhost:8080/actuator/health

⁠Jaeger Env Vars


JAEGER_SERVICE_NAME=foo
JAEGER_SAMPLER_TYPE=const
JAEGER_SAMPLER_PARAM=1
JAEGER_REPORTER_LOG_SPANS=true
JAEGER_ENDPOINT=http://{Your_Jaeger_Server}:14268/api/traces

Tag summary

Content type

Image

Digest

Size

251 MB

Last updated

almost 7 years ago

docker pull kunupat/foo