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:
@@ -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" ]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user