Compare commits
52 Commits
a95dc5d92e
...
main
Author | SHA1 | Date | |
---|---|---|---|
d7d39e85ac | |||
1e924472bb | |||
3f10bd7a95 | |||
10581b44b1 | |||
add791e087 | |||
7f22479d29
|
|||
ec69c49371
|
|||
f526c20e78 | |||
85d715ad00 | |||
ac2a6c1753 | |||
eb9fafdc96 | |||
82df4ba11d | |||
7cd9da93aa | |||
2aaef7bab0 | |||
9fe94e6ce7 | |||
f943915553 | |||
9feb042414 | |||
65d61005c4 | |||
d33ba9590f | |||
1a21f4c1ab | |||
1c01bfd00f | |||
f89f7be21c | |||
b084b18e5a | |||
5ad9090417 | |||
51fb2029f0 | |||
fccad406d3 | |||
1f4fec6aa3 | |||
854ec97956 | |||
e49ee45709 | |||
b736318908 | |||
b595726742 | |||
fed3f486aa | |||
15d0773bce | |||
037aaf63eb | |||
57eeabe134 | |||
5f08b3ea3a | |||
581fbd415c | |||
49d8906b92 | |||
5954f22939 | |||
795b1d0539 | |||
1e69982156 | |||
c9e5477b12
|
|||
0296bd97d6
|
|||
9e15ffecef
|
|||
df66e3116a
|
|||
09f914057c
|
|||
4e2415e807
|
|||
1134b4572b
|
|||
c215e7997f
|
|||
49fe169288
|
|||
a164e91b73
|
|||
96c1306cd5
|
19
.drone.yml
Normal file
19
.drone.yml
Normal file
@ -0,0 +1,19 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: deploy to autonomic-ruangrupa
|
||||
steps:
|
||||
- name: deploy new theme
|
||||
image: 3wordchant/docker-cp-deploy:latest
|
||||
settings:
|
||||
host: lumbung.space
|
||||
service: login_lumbung_space_app
|
||||
source: lumbung.space
|
||||
dest: /opt/keycloak/themes
|
||||
deploy_key:
|
||||
from_secret: drone_ssh_lumbung.space
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
||||
event:
|
||||
exclude:
|
||||
- pull_request
|
35
README.md
35
README.md
@ -1,5 +1,40 @@
|
||||
# login.lumbung.space
|
||||
|
||||
[](https://drone.autonomic.zone/ruangrupa/login.lumbung.space)
|
||||
|
||||
> [login.lumbung.space](https://login.lumbung.space)
|
||||
|
||||
[Custom theming](https://www.keycloak.org/docs/latest/server_development/index.html#_themes) for the Keycloak SSO service.
|
||||
|
||||
Please see [default-themes/README.md](./default-themes/README.md) and [lumbung.space/README.md](./lumbung.space/README.md) for more info.
|
||||
|
||||
## Deployment
|
||||
|
||||
Just send commits and the [Drone CI/CD configuration](./.drone.yml) will take care of the rest.
|
||||
|
||||
## Custom theming workflow
|
||||
|
||||
You'll need a local [Docker](https://docs.docker.com/engine/install/debian/) installation.
|
||||
|
||||
Then run a local Keycloak instance and mount the theme into the container with the following ([makefile source](./makefile)):
|
||||
|
||||
```
|
||||
$ make
|
||||
```
|
||||
|
||||
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
|
||||
|
||||
See related documentation and tutorials for the hacking:
|
||||
|
||||
- [Create a custom theme for Keycloak](https://auscunningham.medium.com/create-a-custom-theme-for-keycloak-8781207be604)
|
||||
- [Change Login Theme in Keycloak Docker image](https://austincunningham.ddns.net/2020/changekeycloakdockertheme)
|
||||
- [Keycloak themes documentation](https://www.keycloak.org/docs/latest/server_development/index.html#_themes)
|
||||
- [Keycloak Github repo for default themes](https://github.com/keycloak/keycloak/tree/master/themes/src/main/resources/theme)
|
||||
- [Keycloak container documentation](https://github.com/keycloak/keycloak-containers/tree/master/server)
|
||||
|
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
|
3
default-themes/README.md
Normal file
3
default-themes/README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# default-themes
|
||||
|
||||
The keycloak documentation says that it is not recommended to modify existing themes. Therefore, we include these files here as a copy/pasta of [those existing themes in the Keycloak github repository](https://github.com/keycloak/keycloak/tree/master/themes/src/main/resources/theme) for the purpose of copying over to a custom theme. If you want to make theme changes, please make them in the [lumbung.space](../lumbung.space) folder.
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user