-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcompose.keycloak.yaml
More file actions
33 lines (32 loc) · 1.06 KB
/
compose.keycloak.yaml
File metadata and controls
33 lines (32 loc) · 1.06 KB
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
# Keycloak overlay for production/air-gapped deployments
# Usage: docker compose -f compose.yaml -f compose.keycloak.yaml up
services:
keycloak:
image: quay.io/keycloak/keycloak:26.0.5
command: start-dev --import-realm --hostname-strict=false
environment:
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_ADMIN_PASSWORD:-admin}
KC_DB: postgres
KC_DB_URL: jdbc:postgresql://postgres:5432/keycloak
KC_DB_USERNAME: ${KC_DB_USERNAME:-keycloak}
KC_DB_PASSWORD: ${KC_DB_PASSWORD:-keycloak}
ports:
- "8080:8080"
networks:
- kartograph
volumes:
- ./keycloak/realm.json:/opt/keycloak/data/import/realm.json:ro
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
[
"CMD-SHELL",
"exec 3<>/dev/tcp/127.0.0.1/8080;echo -e 'GET /health/ready HTTP/1.1\r\nhost: localhost\r\nConnection: close\r\n\r\n' >&3;if [ $? -eq 0 ]; then exit 0; else exit 1; fi",
]
interval: 10s
timeout: 5s
retries: 10
start_period: 30s