Skip to content

Commit

Permalink
Working example of realm import
Browse files Browse the repository at this point in the history
  • Loading branch information
falcowinkler committed Jul 22, 2024
1 parent 7635ae6 commit 1add48c
Show file tree
Hide file tree
Showing 3 changed files with 1,892 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,13 @@ export KEYCLOAK_HOSTNAME=keycloak.authjs.dev

docker run -d --name authjs-keycloak -v /path-to-letsencrypt-certificates:/certificates -p 443:443 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=$KEYCLOAK_ADMIN_PASSWORD quay.io/keycloak/keycloak:latest start --features=token-exchange --https-certificate-file=/certificates/fullchain.pem --https-certificate-key-file=/certificates/privkey.pem --hostname=$KEYCLOAK_HOSTNAME --proxy=edge --https-port=443
```

## Importing the test realm

It is also possible to start up the keycloak with test data by using the realm exported in the `export` folder.

Example to start locally:

```bash
docker run --name authjs-keycloak -p 8080:8080 -e KEYCLOAK_ADMIN=admin -e KEYCLOAK_ADMIN_PASSWORD=admin -e AUTHJS_TEST_CLIENT_SECRET=abc -v $(pwd)/export:/opt/keycloak/data/import quay.io/keycloak/keycloak:25.0.2 start-dev --import-realm
```
Loading

0 comments on commit 1add48c

Please sign in to comment.