Skip to content

JGROUPS_DISCOVERY_EXTERNAL_IP to be set dynamically #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions 17.0.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,11 @@ FROM quay.io/keycloak/keycloak:17.0.0
COPY cache-ispn-jdbc-ping.xml /opt/keycloak/conf/cache-ispn-jdbc-ping.xml

ENV KC_CACHE_CONFIG_FILE=cache-ispn-jdbc-ping.xml

USER root

RUN microdnf install -y hostname

RUN sed -i '1 a export JGROUPS_DISCOVERY_EXTERNAL_IP=$(hostname -i)' /opt/keycloak/bin/kc.sh

USER keycloak
51 changes: 51 additions & 0 deletions 17.0.0/docker-compose-example.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#just an example, it will not work out of the box#
version: '2'
volumes:
keycloak_postgres0_data:
external: true
driver: netapp

services:
keycloak:
mem_limit: 4294967296
mem_reservation: 2147483648
image: eeacms/eea-keycloak:tag
environment:

KC_DB: changeme
KC_DB_PASSWORD: changeme
KC_DB_SCHEMA: public
KC_DB_URL: jdbc:postgresql://pg-0:5432/changeme?currentSchema=public
KC_DB_URL_DATABASE: changeme
KC_DB_URL_HOST: pg-0
KC_DB_USERNAME: changeme
KEYCLOAK_ADMIN: changeme
KEYCLOAK_ADMIN_PASSWORD: changeme
PROXY_ADDRESS_FORWARDING: 'true'
TZ: Europe/Copenhagen

AUTH_CACHE_OWNERS_COUNT: '3'
CACHE_OWNERS_COUNT: '3'
command:
- start
- --http-enabled=true
- --http-port=8080
- --http-host=0.0.0.0
- --hostname=whatever.com
- --hostname-strict-https=false
- --db-url-host=pg-0
- -Dkc.db=postgres
- --db-username=changeme
- --db-password=changeme
- --db-schema=public
- --db-url-database=changeme
- --proxy=passthrough
- -Dkeycloak.profile.feature.upload_scripts=enabled
- --cache=ispn
- --auto-build
- --metrics-enabled=true

#change your db backend as you wish
pg-0:
image: docker.io/bitnami/postgresql-repmgr:13
#do your settings as you like.