Skip to content

little-pinecone/keycloak-in-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keycloak-in-docker

keep_growing logo

About this project

This simple project shows an example Docker configuration for Keycloak.

To learn how to set up a project like this one, check out the following articles:

Getting started

First, clone this repository.

Then, start the keycloak and keycloakdb containers with the following command:

docker-compose -f docker-compose-keycloak.yml up -d

Make sure that the keycloak container is up. For instance, you can run the docker ps command in your terminal:

docker container list screenshot

The keycloak service has a default realm imported from the keycloak/realms/realm-export.json file that specifies all the default users. Information about the import can be found in the container logs when the service is started for the first time:

imported realm info in container logs screenshot

Credentials

Below you'll find a list of default user accounts.

Keycloak admin

  • username: keycloak
  • password: keycloak

Default users

  • usernames: christina, hanna, carlo, noel
  • password: test
  • realm role: user

Visit Keycloak

keycloak welcome screen screenshot

  • Select the Administration Console option and log in as the Keycloak admin [keycloak:keycloak]:

keycloak login screen screenshot

Features

  • Dockerized Keycloak server and its PostgreSQL database
  • Default Example-Realm is imported when the keycloak container starts
  • Keycloak themes are customized for the Login and Account types:

customised login page screenshot

customised account page screenshot

Deploying to production

The Keycloak theme caching is disabled to allow for fast and convenient theme editing. Remember to re-enable caching in production as it will significantly impact performance. To do this, remove the - ./keycloak/scripts/disable-theme-cache.cli:/opt/jboss/startup-scripts/disable-theme-cache.cli volume from the docker-compose-keycloak.yml file.

Built With

About

Example of Docker configuration for Keycloak

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published