Code Monkey home page Code Monkey logo

Comments (2)

piomin avatar piomin commented on May 22, 2024 1

In the docker-compose.yml I have the following entry with a health check verification:

  config-service:
    image: piomin/config-service:1.1-SNAPSHOT
    ports:
      - "8088:8088"
    healthcheck:
      test: curl --fail http://localhost:8088/employee/docker  || exit 1
      interval: 5s
      timeout: 2s
      retries: 3

I need it to first verify that config-server container is running, before I'll start another containers. Tha't why I need curl inside that container. For example, Paketo Buildpacks Java images don't have curl installed.

from sample-spring-microservices-new.

afattahi54 avatar afattahi54 commented on May 22, 2024

Thanks, just a comment

When I run curl http://127.0.0.1:8088/employee/docker I get :

{"name":"employee","profiles":["docker"],"label":null,"version":null,"state":null,"propertySources":[]}

This shows that the server is up and running. But, is it better to use some thing like curl http://127.0.0.1:8088/employee-service/docker, which returns better results:

{"name":"employee-service","profiles":["docker"],"label":null,"version":null,"state":null,"propertySources":[{"name":"classpath:/config/employee-service-docker.yml","source":{"server.port":8080,"eureka.client.serviceUrl.defaultZone":"http://discovery-service:8061/eureka/","eureka.instance.hostname":"employee-service","logging.pattern.console":"%d{yyyy-MM-dd HH:mm:ss} [%X{traceId:-},%X{spanId:-}] ${LOG_LEVEL_PATTERN:-%5p} %m%n","springdoc.packagesToScan":"pl.piomin.services.employee","spring.output.ansi.enabled":"always","management.tracing.sampling.probability":1.0,"management.zipkin.tracing.endpoint":"http://zipkin:9411/api/v2/spans"}},{"name":"classpath:/config/employee-service.yml","source":{"server.port":0,"eureka.client.serviceUrl.defaultZone":"http://localhost:8061/eureka/","logging.pattern.console":"%d{yyyy-MM-dd HH:mm:ss} [%X{traceId:-},%X{spanId:-}] ${LOG_LEVEL_PATTERN:-%5p} %m%n","springdoc.packagesToScan":"pl.piomin.services.employee","spring.output.ansi.enabled":"always","management.tracing.sampling.probability":1.0}}]}

from sample-spring-microservices-new.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.