Compare commits
3 Commits
4e2415e807
...
9e15ffecef
Author | SHA1 | Date | |
---|---|---|---|
9e15ffecef
|
|||
df66e3116a
|
|||
09f914057c
|
22
README.md
22
README.md
@ -16,18 +16,22 @@ Just send commits and the [Drone CI/CD configuration](./.drone.yml) will take ca
|
||||
|
||||
You'll need a local [Docker](https://docs.docker.com/engine/install/debian/) installation.
|
||||
|
||||
Then run a local Keycloak and mount the theme into the container with:
|
||||
Then run a local Keycloak instance and mount the theme into the container with the following ([makefile source](./makefile)):
|
||||
|
||||
```bash
|
||||
docker run \
|
||||
-p 8080:8080 \
|
||||
-v $(pwd)/lumbung.space:/opt/jboss/keycloak/themes/lumbung.space \
|
||||
-e KEYCLOAK_USER=admin \
|
||||
-e KEYCLOAK_PASSWORD=admin \
|
||||
jboss/keycloak:12.0.4
|
||||
```
|
||||
$ make
|
||||
```
|
||||
|
||||
Then you can log into [localhost:8080](http://localhost:8080) with username: `admin` and password: `admin`.
|
||||
An example workflow for customising the login theme would be:
|
||||
|
||||
- Log into [localhost:8080](http://localhost:8080) with username: `admin` and password: `admin`
|
||||
- Go to [Realm Settings > Themes](http://localhost:8080/auth/admin/master/console/#/realms/master/theme-settings)
|
||||
- Choose a custom login theme via Login Theme > lumbung.space and click Save
|
||||
- Sign out and you'll be redirected to the login page
|
||||
- Now, test you can make an edit and it is reflected on reload, change the "Username or email" string in [mesages_en.properties](./lumbung.space/login/messages/messages_en.properties)
|
||||
- Reload the page, your change should be live
|
||||
|
||||
Once you're finished theming, `git push` and the [Drone CI config](.drone.yml) will deploy this live to [login.lumbung.space](https://login.lumbung.space).
|
||||
|
||||
See related documentation and tutorials for the hacking:
|
||||
|
||||
|
5
bin/disable-theme-cache.cli
Normal file
5
bin/disable-theme-cache.cli
Normal file
@ -0,0 +1,5 @@
|
||||
embed-server --std-out=echo --server-config=standalone-ha.xml
|
||||
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheThemes,value=false)
|
||||
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=cacheTemplates,value=false)
|
||||
/subsystem=keycloak-server/theme=defaults/:write-attribute(name=staticMaxAge,value=-1)
|
||||
stop-embedded-server
|
@ -366,7 +366,7 @@ openshift.scope.list-projects=List projects
|
||||
# SAML authentication
|
||||
saml.post-form.title=Authentication Redirect
|
||||
saml.post-form.message=Redirecting, please wait.
|
||||
saml.post-form.js-disabled=JavaScript is disabled. We strongly recommend to enable it. Click the button below to continue.
|
||||
saml.post-form.js-disabled=JavaScript is disabled. We strongly recommend to enable it. Click the button below to continue.
|
||||
saml.artifactResolutionServiceInvalidResponse=Unable to resolve artifact.
|
||||
|
||||
#authenticators
|
||||
@ -412,4 +412,4 @@ loggingOutImmediately=Logging you out immediately
|
||||
accountUnusable=Any subsequent use of the application will not be possible with this account
|
||||
userDeletedSuccessfully=User deleted successfully
|
||||
|
||||
access-denied=Access denied
|
||||
access-denied=Access denied
|
||||
|
18
makefile
Normal file
18
makefile
Normal file
@ -0,0 +1,18 @@
|
||||
default: run
|
||||
|
||||
run: ## run a new container
|
||||
@docker run \
|
||||
-p 8080:8080 \
|
||||
-v $$(pwd)/lumbung.space:/opt/jboss/keycloak/themes/lumbung.space \
|
||||
-v $$(pwd)/bin/disable-theme-cache.cli:/opt/jboss/startup-scripts/disable-theme-cache.cli \
|
||||
-e KEYCLOAK_USER=admin \
|
||||
-e KEYCLOAK_PASSWORD=admin \
|
||||
--name keycloakdev \
|
||||
--rm \
|
||||
jboss/keycloak:12.0.4
|
||||
|
||||
shell: ## get a shell in the container
|
||||
@docker exec -it keycloakdev /bin/bash
|
||||
|
||||
stop: ## tear down the container
|
||||
@docker stop keycloakdev && docker rm keycloakdev
|
Reference in New Issue
Block a user