Repository navigation
Keycloak Quarkus Postgres Setup with docker-compose #13516
|
Hi, I'm experimenting with Keycloak Quarkus 19.0.1 and Postgres in a simple docker-compose scenario. I'm new to docker-compose and it seems there a still some errors in my configuration. Can someone please help me to get forward? My startup error looks like this. Basically it seems like my keycloak container has no access to postgres port 5432?
This is my environment file. My yaml looks like this: Beside my yaml file I have a folder keycloak_data with cert and key *.pem files and an folder user_db with content pgdata initialized by keycloak. |
Replies: 2 comments
|
I'm a few steps further. At the moment I'm putting both containers into a docker bridged network. Also I named my postgres container keycloak-db and tried to reach it as hostname postgres from keycloak environment settings. Now I'm facing another interresting behavior. With following keycloak env variables: I get the following startup error: What is going on here oO? Why does it try to find a database, named like my env variable KC_DB_URL_PROPERTIES ??? |
|
Okay my setup is running now. I ended up with the following yaml. Not sure if the explicit network is necessary because most keycloak docker-compose examples don't have that. My env file looks like that: The scope of my question is solved. It would be great if one of the more experienced Docker/Keycloak experts could make an official and comprehensive tutorial of a docker-compose setup with database. |
Okay my setup is running now.
I ended up with the following yaml.