Skip to content

Local Keycloak setup

Benoît Jeaurond edited this page Nov 8, 2020 · 1 revision
  1. Add the network_mode to the backend container to "host" (in docker-compose.yml)
  2. And add the following docker-compose service
keycloak:
  container_name: "italent-keycloak"
  image: "jboss/keycloak"
  ports:
    - "8180:8180"
  volumes:
    - ./keycloak:/opt/jboss/keycloak/keycloak
  hostname: keycloak
  command:
    - "-Dkeycloak.import=/opt/jboss/keycloak/keycloak/realm-export.json -Djboss.http.port=8180"
  environment:
    KEYCLOAK_USER: administrator
    KEYCLOAK_PASSWORD: password
  1. You'll need to make everything linking a container in the backend to refer localhost instead (i.e. redis and postgres)
  2. You'll also need to update the keycloak environment variables in the frontend and in the backend to refer to http://localhost:8180/auth

The credentials for the users when using the local keycloak are specified in the realm-export.json file

Clone this wiki locally