dasniko / testcontainers-keycloak

A Testcontainer implementation for Keycloak IAM & SSO.
Apache License 2.0
328 stars 51 forks source link

Add DB_VENDOR=h2 environment variable as a default setting #24

Closed dasniko closed 3 years ago

dasniko commented 3 years ago

The Keycloak Docker container has some "DNS magic" to determine which database to use, if there is a host with a specific name on the network. This yields into startup errors for various users, depending on their netowrk, VPN, DNS, etc. There are multiple reasons for that.

As the Keycloak Testcontainer doesn't need an external DB and should only use the internal built-in DB h2, the usage of this DB should be forced. This can be achieved by setting the environment variable DB_VENDOR to the value h2.

If one really wants or needs to use the testcontainer with another DB, the user still could override the value as desired.