Keycloak container not able to connect to external database

Viewed 25

I am trying to connect keycloak docker image quay.io/keycloak/keycloak:19.0.2 to Azure managed postgres database instance. Reason: Our main application db is on azure so it's preferrable for us to point keycloak to same database.

We already tried and tested the keycloak functionality using standalone linux installation (./bin/kc.sh) which easily connected to azure postgres database and all our realms and user, client configuration is set into this azure postgres database.

Command: docker run --env-file endpoint.txt -p 8080:8080 quay.io/keycloak/keycloak:19.0.2 start-dev

Contents in endpoint.txt file:

DB_VENDOR=postgres
DB_ADDR=Azure_postgres_url
DB_PORT=5432
DB_DATABASE=keycloak_database
DB_USER=user
DB_PASSWORD=password

Behaviour: http://public_ip:8080/

Keycloak landing page shows but it's not connected to existing azure db, we have to set admin account , realms and user configurations from scratch. Mostly keycloak is using it's internal database (H2)

Your help is appreciated. Thanks for your time.

0 Answers
Related