Skip to content

<Commerzbank> Improve a health check for keycloak container #159

Closed

Description

@wgalanciak

Description

The current health check is very rudimental:

healthcheck:
  test: ["CMD-SHELL", "echo > /dev/tcp/localhost/8080 || exit 1"]
  interval: 10s
  timeout: 5s
  retries: 5
  start_period: 30s

The issue is that it does not really check if the SSO provider is ready. As a result, if you add depends_on rule to the codetogether-intel container, it may still send false positive.

Activity

  1. added
    area: docker
    on Aug 8, 2025
  2. added theissue type on Aug 8, 2025
  3. added this to the NEXT milestone on Aug 11, 2025
  4. changed the title [-]Improve a health check for keycloak container[/-] [+]<Commerzbank> Improve a health check for keycloak container[/+] on Aug 11, 2025
  5. DavidRS13 commented on Aug 12, 2025

    @DavidRS13

    @nmorenor this can be tested in any of our environments (hq.edge, hq-build, qa, etc.) ?

  6. waldekCT commented on Aug 13, 2025

    @waldekCT
    2025-08-13 10:02 [INFO] Starting CodeTogether Web server ...
    
    
    
    2025-08-13 10:02 [INFO] Web Server configuration validated.
    
    nginx: the configuration file /etc/nginx/nginx.conf syntax is ok nginx: configuration file /etc/nginx/nginx.conf test is successful
    
    2025-08-13 10:02 [INFO] Web Server started successfully!
    
    
    2025-08-13 10:02 [INFO] Starting CodeTogether...
    
    
    Clients URL is present: [https://waldek.edge.codetogether.com⁠](https://waldek.edge.codetogether.com/)
    
    
    Updating IntelliJ client...
    
    
    Updating VS Code client...
    
    
    Updating Visual Studio client...
    
    
    Updating Eclipse client...
    
    Starting CodeTogether Intel...
    
    Aug 13, 2025 10:02:16 AM com.codetogether.hq.backend.Application main
    
    INFO: Backend started with the following customization:
    
      - No customization detected
    
    -------------------------------------------------------------------
    
    ===================================================================
    
    CodeTogether Intel backend could not start:
    
    
    Invalid database type: null
    
    ===================================================================
    
    -------------------------------------------------------------------
    
    CodeTogether Intel's backend service has stopped.
    

    I think its not proper healthcheck message, reproduced by commenting sso tennants in crthq.properties on local docker instance. @nmorenor is this proper way to reproduce?

  7. j-khosravi commented on Aug 13, 2025

    @j-khosravi

    To verify this ticket, follow the documentation for keycloak.
    @nmorenor please add the URL for the documentation location for how to deploy Keycloak. Thanks!

  8. nmorenor commented on Aug 13, 2025

    @nmorenor
    Member

    Setup Workflow
    1. Start Keycloak only:
    Run docker compose up for Keycloak and access its admin interface. Configure a realm and an OpenID client to be used by CodeTogether. (attached pdf)
    2. Stop Keycloak Compose:
    Once Keycloak is configured, stop the Docker Compose instance running only Keycloak.
    3. Merge configurations:
    • Combine the NGINX configuration from the Keycloak setup with the NGINX configuration used in the main CodeTogether Compose file. (https://github.com/CodeTogether-Inc/CodeTogether-Deployment/blob/main/compose/nginx/nginx-with-keycloak.conf.template)
    • Remove the NGINX service from the Keycloak Compose file. (https://github.com/CodeTogether-Inc/CodeTogether-Deployment/blob/main/compose/keycloak/compose-keycloak-no-nginx.yaml)
    • Merge both .env files. (https://github.com/CodeTogether-Inc/CodeTogether-Deployment/blob/main/compose/.env-with-keycloak-template)
    4. Start all services:
    Run Docker Compose using the main CodeTogether file and the modified Keycloak Compose file (with NGINX removed).

  9. DavidRS13 commented on Aug 14, 2025

    @DavidRS13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

TEST_FAILEDarea: dockerneed-clarity

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions