As of now, the application initializes Keycloak and checks for the existence of required database tables during startup in the main() function. If any of these steps fail, the application panics and exits. This tightly couples critical infrastructure setup with the main runtime logic, making it harder to manage failures and increasing startup complexity. To improve reliability, separation of concerns, and observability, this initialization logic should be offloaded to a dedicated init container.
As of now, the application initializes Keycloak and checks for the existence of required database tables during startup in the main() function. If any of these steps fail, the application panics and exits. This tightly couples critical infrastructure setup with the main runtime logic, making it harder to manage failures and increasing startup complexity. To improve reliability, separation of concerns, and observability, this initialization logic should be offloaded to a dedicated init container.