Keycloak comes vith various way of running it: Bare server, Docker, Kubernetes, OpenShift, etc.. Keycloak server installation and configuration documentation is excellent. Keycloak needs a database to run and offers several choices (Oracle, SQL Server, PostgreSQL, MySQL), by default it uses an H2 embedded database. I choose to run Keycloak with Postgres as it’s easier to investigate data in a Postgres DB and it’s now very frequent that I choose Postgres for my persistence needs.
During development, I choose Docker Compose to run Postgres alongside Keycloak, the repository holds a
docker-compose.yml file to easily starts a Keycloak standalone instance persisting data in a Postgres DB.
To start Keycloak with Postgres:
- install Docker Compose
- Clone this repo:
git clone email@example.com:jgrodziski/keycloak-clojure.git
- and execute:
docker-compose up(by the way go check that gist of useful docker aliases)
- you should now have two running containers: Keycloak and Postgres (check with
- the Keycloak administration console is now available at http://localhost:8090