Skip to content

Commit b673d83

Browse files
authored
Merge pull request #2888 from bcgov/feature/UpdateKeycloak
update keycloak
2 parents 06e4e23 + b760903 commit b673d83

File tree

2 files changed

+22
-9
lines changed

2 files changed

+22
-9
lines changed

docker-compose.yml

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -138,25 +138,36 @@ services:
138138
# ### KEYCLOAK ###
139139
# #############################################################################################
140140
keycloak:
141-
image: quay.io/keycloak/keycloak:12.0.3
141+
image: quay.io/keycloak/keycloak:26.1.3
142142
environment:
143-
DB_VENDOR: H2
144-
KEYCLOAK_USER: admin
145-
KEYCLOAK_PASSWORD: admin
146-
KEYCLOAK_IMPORT: /tmp/realm-export.json
147-
KEYCLOAK_FRONTEND_URL: http://localhost:8081/auth
143+
- KC_HEALTH_ENABLED=true
144+
- KC_METRICS_ENABLED=true
145+
- KC_HTTP_ENABLED=true
146+
- KC_HOSTNAME_STRICT_HTTPS=false
147+
- KEYCLOAK_SSL_REQUIRED=none
148+
- KC_HOSTNAME_STRICT_BACKCHANNEL=false
149+
- KC_PROXY_HEADERS=xforwarded
150+
- KC_HOSTNAME=localhost
151+
- KC_HTTP_RELATIVE_PATH=/auth
152+
- KC_HOSTNAME_PORT=8080
153+
- DB_VENDOR=H2
154+
- KC_BOOTSTRAP_ADMIN_USERNAME=admin
155+
- KC_BOOTSTRAP_ADMIN_PASSWORD=admin
156+
- KC_DIR=/opt/keycloak/data/import
148157
volumes:
149-
- ./infrastructure/keycloak/realm-export.json:/tmp/realm-export.json
158+
- ./infrastructure/keycloak/realm-export.json:/opt/keycloak/data/import/realm-export.json
150159
ports:
151-
- "8081:8080"
160+
- 8081:8080
161+
restart: always
162+
command: start --import-realm
152163
networks:
153164
- fisu-net
154165

155166
# #############################################################################################
156167
# ### KEYCLOAK Config ###
157168
# #############################################################################################
158169
keycloak-config:
159-
command: sh -c "dockerize -wait http://keycloak:8080 -timeout 300s /tmp/createuser.sh"
170+
command: sh -c "dockerize -timeout 300s /tmp/createuser.sh"
160171
networks:
161172
- fisu-net
162173

infrastructure/keycloak/createuser.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
sleep 1m
4+
35
KEYCLOAK_REALM_URL="$KEYCLOAK_URL/auth/admin/realms/Efiling-Hub"
46
USERNAME="bobross"
57
ADMIN_GROUP="efiling-admin"

0 commit comments

Comments
 (0)