Skip to content

Commit

Permalink
refactor examples. updates to kc22 (#16)
Browse files Browse the repository at this point in the history
* refactor examples. updates to kc22

* wrong admin portal version

* added ported admin jar. updated everything to 22.0.1

* kc22 requires resteasy 6.2.4.Final

* entrypoint change
  • Loading branch information
xgp authored Aug 17, 2023
1 parent daf24fa commit 577e4a0
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 53 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ on:
- main

env:
# Version 21.1.2
VERSION_MAJOR: 21
VERSION_SUBMAJOR: 1
VERSION_MINOR: 2
# Version 22.0.1
VERSION_MAJOR: 22
VERSION_SUBMAJOR: 0
VERSION_MINOR: 1

jobs:
release-public:
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM quay.io/phasetwo/keycloak-crdb:21.1.2 as builder
FROM quay.io/phasetwo/keycloak-crdb:22.0.1 as builder

ENV KC_METRICS_ENABLED=true
ENV KC_HEALTH_ENABLED=true
Expand All @@ -12,14 +12,15 @@ COPY ./conf/cache-ispn-jdbc-ping.xml /opt/keycloak/conf/cache-ispn-jdbc-ping.xml

# custom keycloak.conf
#COPY ./conf/keycloak.conf /opt/keycloak/conf/keycloak.conf
#COPY ./conf/quarkus.properties /opt/keycloak/conf/quarkus.properties

# 3rd party themes and extensions
COPY ./libs/ext/*.jar /opt/keycloak/providers/
COPY ./libs/target/container*/*.jar /opt/keycloak/providers/

RUN /opt/keycloak/bin/kc.sh --verbose build --spi-email-template-provider=freemarker-plus-mustache --spi-email-template-freemarker-plus-mustache-enabled=true --spi-theme-cache-themes=false

FROM quay.io/phasetwo/keycloak-crdb:21.1.2
FROM quay.io/phasetwo/keycloak-crdb:22.0.1

USER root

Expand All @@ -31,6 +32,8 @@ USER 1000
COPY --from=builder /opt/keycloak/lib/quarkus/ /opt/keycloak/lib/quarkus/
COPY --from=builder /opt/keycloak/providers/ /opt/keycloak/providers/
COPY --from=builder /opt/keycloak/conf/cache-ispn-jdbc-ping.xml /opt/keycloak/conf/cache-ispn-jdbc-ping.xml
#COPY --from=builder /opt/keycloak/conf/quarkus.properties /opt/keycloak/conf/quarkus.properties
#COPY --from=builder /opt/keycloak/conf/keycloak.conf /opt/keycloak/conf/keycloak.conf

WORKDIR /opt/keycloak
# this cert shouldn't be used, as it's just to stop the startup from complaining
Expand Down
12 changes: 9 additions & 3 deletions examples/cockroach/phasetwo-crdb.yml → docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,15 @@ services:
ports:
- 26257:26257
keycloak:
image: phasetwo/phasetwo-keycloak-crdb:latest
build: .
environment:
KC_DB: cockroach
KC_HTTP_RELATIVE_PATH: /auth
PROXY_ADDRESS_FORWARDING: 'true'
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: password
KEYCLOAK_PASSWORD: admin
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
KEYCLOAK_ADMIN_PASSWORD: admin
KC_DB_URL_HOST: cockroach
KC_DB_URL_PORT: 26257
KC_DB_URL_DATABASE: defaultdb
Expand All @@ -35,11 +37,15 @@ services:
KC_LOG_LEVEL: INFO
KC_TRANSACTION_XA_ENABLED: 'false'
KC_TRANSACTION_JTA_ENABLED: 'false'
KC_FEATURES: preview,admin2
KC_METRICS_ENABLED: true
KC_HEALTH_ENABLED: true
ports:
- 8080:8080
- 8443:8443
depends_on:
- cockroach
entrypoint: /opt/keycloak/bin/kc.sh --verbose start --spi-email-template-provider=freemarker-plus-mustache --spi-email-template-freemarker-plus-mustache-enabled=true --spi-theme-cache-themes=false
caddy:
image: caddy:2.4.6-alpine
restart: unless-stopped
Expand Down
18 changes: 0 additions & 18 deletions examples/cockroach/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ services:
ports:
- 26257:26257
keycloak:
image: quay.io/phasetwo/keycloak-crdb:latest
image: quay.io/phasetwo/phasetwo-keycloak:latest
environment:
KC_DB: cockroach
KC_HTTP_RELATIVE_PATH: /auth
Expand All @@ -39,6 +39,7 @@ services:
KC_LOG_LEVEL: INFO
KC_TRANSACTION_XA_ENABLED: 'false'
KC_TRANSACTION_JTA_ENABLED: 'false'
entrypoint: ["/opt/keycloak/bin/kc.sh", "start", "--spi-email-template-provider=freemarker-plus-mustache", "--spi-email-template-freemarker-plus-mustache-enabled=true", "--spi-theme-cache-themes=false"]
ports:
- 8080:8080
- 8443:8443
Expand Down
16 changes: 0 additions & 16 deletions examples/postgres/Dockerfile

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ services:
ports:
- 5433:5432
keycloak:
image: phasetwo/phasetwo-keycloak-test-crdb:latest
image: quay.io/phasetwo/phasetwo-keycloak:latest
environment:
PROXY_ADDRESS_FORWARDING: 'true'
KEYCLOAK_USER: admin
Expand All @@ -34,7 +34,8 @@ services:
KC_HTTP_ENABLED: 'true'
KC_PROXY: 'edge'
KC_LOG_LEVEL: INFO
ports:
entrypoint: ["/opt/keycloak/bin/kc.sh", "start", "--spi-email-template-provider=freemarker-plus-mustache", "--spi-email-template-freemarker-plus-mustache-enabled=true", "--spi-theme-cache-themes=false"]
 ports:
- 8080:8080
- 8443:8443
depends_on:
Expand Down
Binary file not shown.
14 changes: 7 additions & 7 deletions libs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<keycloak.version>21.1.2</keycloak.version>
<resteasy.version>4.7.7.Final</resteasy.version>
<keycloak-events.version>0.17</keycloak-events.version>
<keycloak-magic-link.version>0.15</keycloak-magic-link.version>
<keycloak-orgs.version>0.36</keycloak-orgs.version>
<keycloak-themes.version>0.17</keycloak-themes.version>
<phasetwo-admin-portal.version>0.8</phasetwo-admin-portal.version>
<keycloak.version>22.0.1</keycloak.version>
<resteasy.version>6.2.4.Final</resteasy.version>
<keycloak-events.version>0.19</keycloak-events.version>
<keycloak-magic-link.version>0.16</keycloak-magic-link.version>
<keycloak-orgs.version>0.40</keycloak-orgs.version>
<keycloak-themes.version>0.18</keycloak-themes.version>
<phasetwo-admin-portal.version>0.11</phasetwo-admin-portal.version>
</properties>

<dependencies>
Expand Down

0 comments on commit 577e4a0

Please sign in to comment.