-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Assign realm-admin role to service account user and test client…
… connection with Keycloak.
- Loading branch information
1 parent
dd0147f
commit 858fb5b
Showing
4 changed files
with
170 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM quay.io/keycloak/keycloak:latest as builder | ||
|
||
# Enable health and metrics support | ||
ENV KC_HEALTH_ENABLED=true | ||
ENV KC_METRICS_ENABLED=true | ||
|
||
# Configure a database vendor | ||
ENV KC_DB=postgres | ||
|
||
WORKDIR /opt/keycloak | ||
# for demonstration purposes only, please make sure to use proper certificates in production instead | ||
RUN keytool -genkeypair -storepass password -storetype PKCS12 -keyalg RSA -keysize 2048 -dname "CN=server" -alias server -ext "SAN:c=DNS:localhost,IP:127.0.0.1" -keystore conf/server.keystore | ||
RUN /opt/keycloak/bin/kc.sh build | ||
|
||
FROM quay.io/keycloak/keycloak:latest | ||
COPY --from=builder /opt/keycloak/ /opt/keycloak/ | ||
|
||
|
||
ENTRYPOINT ["/opt/keycloak/bin/kc.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
version: '3.8' | ||
|
||
services: | ||
postgres: | ||
image: postgres:latest | ||
environment: | ||
POSTGRES_DB: keycloak | ||
POSTGRES_USER: keycloak | ||
POSTGRES_PASSWORD: keycloak | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data | ||
networks: | ||
- keycloak-network | ||
|
||
keycloak: | ||
build: | ||
context: . | ||
dockerfile: Dockerfile.keycloak | ||
environment: | ||
KC_HOSTNAME: localhost | ||
KC_HOSTNAME_PORT: 8080 | ||
KC_HOSTNAME_STRICT_BACKCHANNEL: false | ||
KC_HTTP_ENABLED: true | ||
KC_HOSTNAME_STRICT_HTTPS: false | ||
KEYCLOAK_ADMIN: admin | ||
KEYCLOAK_ADMIN_PASSWORD: admin | ||
KC_DB: postgres | ||
KC_DB_URL: jdbc:postgresql://postgres/keycloak | ||
KC_DB_USERNAME: keycloak | ||
KC_DB_PASSWORD: keycloak | ||
command: | ||
- start-dev | ||
ports: | ||
- "8080:8080" | ||
depends_on: | ||
- postgres | ||
networks: | ||
- keycloak-network | ||
|
||
volumes: | ||
postgres_data: | ||
|
||
networks: | ||
keycloak-network: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters