-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose-import.yml
38 lines (36 loc) · 1.01 KB
/
docker-compose-import.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
version: '3.8'
services:
openfga-import:
depends_on:
openfga:
condition: service_healthy
image: openfga/cli:v0.5.1
container_name: openfga-import
restart: "no"
command: "store create --name keycloak --api-url http://openfga:8080 --model /tmp/model.dsl"
networks:
- default
volumes:
- $PWD/openfga:/tmp
keycloak-import:
depends_on:
openfga:
condition: service_healthy
keycloak:
condition: service_healthy
openfga-import:
condition: service_completed_successfully
image: quay.io/keycloak/keycloak:${KC_VERSION}
container_name: keycloak-import
restart: "no"
entrypoint: [
"sh",
"-c",
"echo 'Waiting 10 secs for importing Keycloak configuration...';sleep 10;/opt/keycloak/import.sh"
]
environment:
KEYCLOAK_URL: http://keycloak:8081
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: password
volumes:
- $PWD/keycloak/import.sh:/opt/keycloak/import.sh