Closed afattahi54 closed 11 months ago
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.
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}}]}
The readme file mentioned that
Can you describe it more please