chore(backend): Automatische import van testdata in Keycloack.
Zie idp/README.md voor meer informatie erover wat de testdata inhoudt.
This commit is contained in:
parent
69ba8c9567
commit
4f201a1253
4 changed files with 4141 additions and 3 deletions
|
@ -11,12 +11,14 @@ services:
|
|||
- postgres_data:/var/lib/postgresql/data
|
||||
idp: # Bron: https://medium.com/@fingervinicius/easy-running-keycloak-with-docker-compose-b0d7a4ee2358
|
||||
image: quay.io/keycloak/keycloak:latest
|
||||
volumes:
|
||||
- ./idp:/opt/keycloak/data/import
|
||||
environment:
|
||||
KC_HOSTNAME: localhost
|
||||
KC_HOSTNAME_PORT: 7080
|
||||
KC_HOSTNAME_STRICT_BACKCHANNEL: "true"
|
||||
KEYCLOAK_ADMIN: admin
|
||||
KEYCLOAK_ADMIN_PASSWORD: admin
|
||||
KC_BOOTSTRAP_ADMIN_USERNAME: admin
|
||||
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
|
||||
KC_HEALTH_ENABLED: "true"
|
||||
KC_LOG_LEVEL: info
|
||||
healthcheck:
|
||||
|
@ -24,9 +26,16 @@ services:
|
|||
interval: 15s
|
||||
timeout: 2s
|
||||
retries: 15
|
||||
command: ["start-dev", "--http-port", "7080", "--https-port", "7443"]
|
||||
command: [
|
||||
"start-dev",
|
||||
"--http-port", "7080",
|
||||
"--https-port", "7443",
|
||||
"--import-realm"
|
||||
]
|
||||
ports:
|
||||
- "7080:7080"
|
||||
- "7443:7443"
|
||||
depends_on:
|
||||
- db
|
||||
volumes:
|
||||
postgres_data:
|
||||
|
|
7
idp/README.md
Normal file
7
idp/README.md
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Testdata in de IDP
|
||||
De IDP in `docker-compose.yml` is zo geconfigureerd dat hij automatisch bij het starten een testconfiguratie inlaadt. Deze houdt in:
|
||||
* Een realm `student` die de IDP voor leerlingen representeert.
|
||||
* Hierin de gebruiker met username `testleerling1`, wachtwoord `password`.
|
||||
* Een realm `teacher` die de IDP voor leerkrachten representeert.
|
||||
* Hierin de gebruiker met username `testleerkracht1`, wachtwoord `password`.
|
||||
* De admin-account (in de realm `master`) heeft username `admin` en wachtwoord `admin`.
|
2062
idp/student-realm.json
Normal file
2062
idp/student-realm.json
Normal file
File diff suppressed because it is too large
Load diff
2060
idp/teacher-realm.json
Normal file
2060
idp/teacher-realm.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue