-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
docker-compose.yml
54 lines (51 loc) · 1.64 KB
/
docker-compose.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
version: '3'
services:
keycloak-postgres:
image: postgres:14
container_name: keycloak-postgres
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U keycloak" ]
interval: 5s
timeout: 5s
retries: 5
ports:
- 5433:5432
keycloak:
image: quay.io/keycloak/keycloak:${KC_VERSION}
container_name: keycloak
command:
- start-dev
environment:
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: password
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
KC_DB_URL_HOST: keycloak-postgres
KC_DB_URL_DATABASE: keycloak
KC_DB_SCHEMA: public
KC_HTTP_PORT: 8081
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
KC_HOSTNAME_STRICT: 'false'
KC_HTTP_ENABLED: 'true'
KC_HEALTH_ENABLED: 'true'
KC_HOSTNAME: keycloak
KC_SPI_EVENTS_LISTENER_OPENFGA_EVENTS_PUBLISHER_API_URL: http://openfga:8080
KC_LOG_LEVEL: info,com.twogenidentity.keycloak:debug,com.twogenidentity.keycloak.utils:debug
healthcheck:
test: ["CMD", "/opt/keycloak/bin/kcadm.sh", "config", "credentials", "--server", "http://localhost:8081", "--realm", "master", "--user", "admin", "--password", "password"]
interval: 5s
timeout: 2s
retries: 15
ports:
- 8081:8081
- 8443:8443
volumes:
- $PWD/keycloak/lib/keycloak-openfga-event-publisher.jar:/opt/keycloak/providers/keycloak-openfga-event-publisher.jar
- $PWD/keycloak/import.sh:/opt/keycloak/import.sh
depends_on:
- keycloak-postgres