keycloak-theme/README.md

28 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

2022-11-27 01:50:14 +00:00
# pub.solar Keycloak theme
2022-11-27 20:38:41 +00:00
## Development setup
2023-07-14 21:16:59 +00:00
To start a Dev Keycloak instance that can show the pub.solar theme, you need to do the following:
2022-11-27 20:38:41 +00:00
2023-07-14 21:16:59 +00:00
1. Go into Keycloak's [Administration Console](https://auth.pub.solar/admin), and export the `pub.solar` realm config. In Keycloak, open the pub.solar realm, click on the menu item "Realm settings", open the dropdown "Action", and click "Partial export". Move the generated JSON file into `./.dev-imports` in this repo.
2022-11-27 20:38:41 +00:00
2. Run the following command:
```
docker run \
--name keycloak-theme-dev \
-p 8080:8080 \
-e KEYCLOAK_ADMIN=admin \
-e KEYCLOAK_ADMIN_PASSWORD=admin \
-v $(pwd):/opt/keycloak/themes/pub.solar \
-v $(pwd)/.dev-import:/opt/keycloak/data/import \
2023-12-06 17:55:36 +00:00
quay.io/keycloak/keycloak:23.0.1 \
2023-07-14 21:16:59 +00:00
start-dev --import-realm --features="declarative-user-profile"
2022-11-27 20:38:41 +00:00
```
3. After this, you can start and stop the container using `docker start keycloak-theme-dev` and `docker-stop keycloak-theme-dev`.
2023-07-14 21:16:59 +00:00
4. Connect to the local Keycloak instance at http://localhost:8080 and open the Administration Console. Login with username: `admin`, password: `admin`.
5. To view the theme in action, open http://localhost:8080/realms/pub.solar/account