Fix: Correct Dockerfile HEALTHCHECK and Swagger UI URL for root-path configuration

- Fixed HEALTHCHECK to use /btpxpress/q/health/ready instead of /q/health/ready
- Added quarkus.swagger-ui.urls.default=/btpxpress/openapi for correct OpenAPI loading
- Ensures Swagger UI loads the spec from the correct path with root-path

These fixes ensure:
1. Docker health checks work correctly with quarkus.http.root-path=/btpxpress
2. Swagger UI correctly loads /btpxpress/openapi instead of /openapi
3. Pods are marked healthy by Kubernetes

Resolves the 404 error in Swagger UI when loading API definition.
This commit is contained in:
dahoud
2025-10-23 15:26:11 +00:00
parent a0b0db5ec8
commit 3bd7f74a77
2 changed files with 2 additions and 1 deletions

View File

@@ -39,7 +39,7 @@ ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss
# Health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=60s --retries=3 \
CMD curl -f http://localhost:8080/q/health/ready || exit 1
CMD curl -f http://localhost:8080/btpxpress/q/health/ready || exit 1
ENTRYPOINT [ "java", "-jar", "/deployments/app.jar" ]