File tree 3 files changed +2711
-1
lines changed
3 files changed +2711
-1
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ version: '3.6'
3
3
services :
4
4
keycloak_web :
5
5
image : quay.io/keycloak/keycloak:23.0.7
6
+ # build: keycloak
6
7
container_name : keycloak_web
7
8
environment :
8
9
KC_DB : postgres
@@ -11,11 +12,13 @@ services:
11
12
KC_DB_PASSWORD : password
12
13
KEYCLOAK_ADMIN : admin
13
14
KEYCLOAK_ADMIN_PASSWORD : password
14
- command : start-dev
15
+ command : [" start-dev", "--import-realm"]
15
16
depends_on :
16
17
- keycloakdb
17
18
ports :
18
19
- 8080:8080
20
+ volumes :
21
+ - ./keycloak:/opt/keycloak/data/import
19
22
20
23
keycloakdb :
21
24
image : postgres:15
Original file line number Diff line number Diff line change
1
+ FROM quay.io/keycloak/keycloak:23.0.7
2
+
3
+ # Make the realm configuration available for import
4
+ COPY ./realm-export.json /opt/keycloak_import/
5
+
6
+ # Import the realm and user
7
+ RUN /opt/keycloak/bin/kc.sh import --optimized --file /opt/keycloak_import/realm-export.json
8
+
9
+ # The Keycloak server is configured to listen on port 8080
10
+ EXPOSE 8080
11
+
12
+ # Import the realm on start-up
13
+ CMD ["start-dev" ]
You can’t perform that action at this time.
0 commit comments