Add Actuator with health/info and update Dockerfile#61
Conversation
…curl in Dockerfile for HTTP healthchecks
…add `Qodana` workflow for code analysis
There was a problem hiding this comment.
Pull Request Overview
This PR adds Spring Boot Actuator support to enable health monitoring and management endpoints, while cleaning up configuration files and updating CI workflows. The changes prepare the application for better production monitoring and health checks.
- Adds Spring Boot Actuator dependency to expose health and info endpoints
- Updates application properties to use environment variables for configuration
- Includes curl in Docker image for HTTP-based health checks
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| cashu-gateway-rest/pom.xml | Adds spring-boot-starter-actuator dependency |
| cashu-gateway-rest/src/main/resources/application.properties | Configures actuator endpoints and removes hardcoded values |
| cashu-gateway-rest/Dockerfile | Installs curl for health check capabilities |
| .github/workflows/pr-quality-gate.yml | Removes PR quality gate workflow |
| .github/workflows/codeql-analysis.yml | Removes CodeQL analysis workflow |
| .github/workflows/code-quality.yml | Adds new Qodana code quality workflow |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| @@ -1,10 +1,14 @@ | |||
| spring.application.name=cashu-gateway-spring | |||
| server.port=${cashu_gateway_port:8080} | |||
| server.port= | |||
There was a problem hiding this comment.
Setting configuration properties to empty values is problematic. These properties should either have default values or use Spring's placeholder syntax with defaults (e.g., ${SERVER_PORT:8080}). Empty values will likely cause application startup failures.
| server.port= | |
| server.port=${SERVER_PORT:8080} |
|
|
||
| #spring.datasource.url=jdbc:postgresql://dbserver/gateway | ||
| spring.datasource.url=jdbc:postgresql://localhost:5432/cashu-gateway | ||
| spring.datasource.url= |
There was a problem hiding this comment.
Setting configuration properties to empty values is problematic. These properties should either have default values or use Spring's placeholder syntax with defaults (e.g., ${SERVER_PORT:8080}). Empty values will likely cause application startup failures.
| spring.datasource.url= | |
| spring.datasource.url=${SPRING_DATASOURCE_URL:jdbc:postgresql://localhost:5432/gateway} |
| spring.datasource.username= | ||
| spring.datasource.password= |
There was a problem hiding this comment.
Setting configuration properties to empty values is problematic. These properties should either have default values or use Spring's placeholder syntax with defaults (e.g., ${SERVER_PORT:8080}). Empty values will likely cause application startup failures.
| spring.datasource.username= | |
| spring.datasource.password= | |
| spring.datasource.password=${SPRING_DATASOURCE_PASSWORD:} |
| spring.datasource.password= | ||
| spring.jpa.database-platform=org.hibernate.dialect.PostgreSQLDialect | ||
|
|
||
| server.address= |
There was a problem hiding this comment.
Setting configuration properties to empty values is problematic. These properties should either have default values or use Spring's placeholder syntax with defaults (e.g., ${SERVER_PORT:8080}). Empty values will likely cause application startup failures.
| server.address= | |
| server.address=${SERVER_ADDRESS:127.0.0.1} |
Qodana Community for JVM5 new problems were found
☁️ View the detailed Qodana report Contact Qodana teamContact us at qodana-support@jetbrains.com
|
Add support for Spring Boot Actuator to expose health and info endpoints. Update environment handling for better configuration. Include
curlin Dockerfile for HTTP-based health checks.