Skip to content

Commit

Permalink
refactor: generate theme files during build time (#74)
Browse files Browse the repository at this point in the history
  • Loading branch information
neumanf authored Oct 6, 2024
1 parent 23946ef commit 932d75b
Show file tree
Hide file tree
Showing 100 changed files with 15 additions and 39,185 deletions.
16 changes: 14 additions & 2 deletions infra/keycloak/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,34 @@ RUN dnf install --installroot /mnt/rootfs curl --releasever 9 --setopt install_w
dnf --installroot /mnt/rootfs clean all && \
rpm --root /mnt/rootfs -e --nodeps setup

FROM node:18 AS theme-builder

RUN apt-get update && \
apt-get install -y openjdk-17-jdk && \
apt-get install -y maven;

COPY ./infra/keycloak/themes/theme-generator/package.json ./infra/keycloak/themes/theme-generator/yarn.lock /opt/app/
WORKDIR /opt/app
RUN yarn install --frozen-lockfile
COPY ../infra/keycloak/themes/theme-generator/ /opt/app/
RUN yarn build-keycloak-theme

FROM quay.io/keycloak/keycloak:25.0.4 AS builder

# Configure a database vendor
ENV KC_DB=postgres

WORKDIR /opt/keycloak

COPY --from=theme-builder /opt/app/dist_keycloak/keycloak-theme-for-kc-22-and-above.jar /opt/keycloak/providers/

RUN /opt/keycloak/bin/kc.sh build

FROM quay.io/keycloak/keycloak:25.0.4

COPY --from=ubi-micro-build /mnt/rootfs /
COPY --from=builder /opt/keycloak/ /opt/keycloak/

COPY ./infra/keycloak/themes/mally/keycloak-theme-for-kc-22-and-above.jar /opt/keycloak/providers/keycloak-theme.jar
COPY ./infra/keycloak/themes/mally /opt/keycloak/themes/mally
COPY ./infra/keycloak/realms/mally.json /opt/keycloak/data/import/mally.json

ENTRYPOINT ["/opt/keycloak/bin/kc.sh"]
5 changes: 0 additions & 5 deletions infra/keycloak/themes/mally/account/resources/css/styles.css

This file was deleted.

Binary file not shown.
Binary file not shown.
6 changes: 0 additions & 6 deletions infra/keycloak/themes/mally/account/theme.properties

This file was deleted.

Binary file not shown.
Loading

0 comments on commit 932d75b

Please sign in to comment.