Skip to content

Commit

Permalink
ci: fix failing healthcheck after keycloak update
Browse files Browse the repository at this point in the history
The latest keycloak version exposes health and metrics on the management
interface listening on 9090 by default.

Also get rid of the warning: URL(string) deprecated in java.
  • Loading branch information
derlin committed Jun 16, 2024
1 parent bb8f539 commit 890f416
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ services:
volumes:
- ./tests/realms:/opt/keycloak/data/import
healthcheck:
test: ['CMD-SHELL', '[ -f /tmp/HealthCheck.java ] || echo "public class HealthCheck { public static void main(String[] args) throws java.lang.Throwable { System.exit(java.net.HttpURLConnection.HTTP_OK == ((java.net.HttpURLConnection)new java.net.URL(args[0]).openConnection()).getResponseCode() ? 0 : 1); } }" > /tmp/HealthCheck.java && java /tmp/HealthCheck.java http://localhost:8080/health/live']
test: ['CMD-SHELL', '[ -f /tmp/HealthCheck.java ] || echo "public class HealthCheck { public static void main(String[] args) throws java.lang.Throwable { System.exit(java.net.HttpURLConnection.HTTP_OK == ((java.net.HttpURLConnection)new java.net.URI(args[0]).toURL().openConnection()).getResponseCode() ? 0 : 1); } }" > /tmp/HealthCheck.java && java /tmp/HealthCheck.java http://localhost:9000/health/live']
interval: 10s
timeout: 5s
retries: 3
Expand Down

0 comments on commit 890f416

Please sign in to comment.