-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
50 lines (49 loc) · 1.67 KB
/
docker-compose.yaml
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
services:
postgres: # https://hub.docker.com/_/postgres
container_name: postgres
image: postgres:14.5-alpine
environment:
POSTGRES_DB: bitnami_keycloak
POSTGRES_USER: bn_keycloak
POSTGRES_PASSWORD: "#3]O?4RGj)DE7Z!9SA5"
restart: on-failure
healthcheck:
test: [ "CMD-SHELL", "pg_isready -d $${POSTGRES_DB} -U $${POSTGRES_USER}" ]
interval: 10s
timeout: 5s
retries: 5
keycloak: # https://hub.docker.com/r/bitnami/keycloak
container_name: keycloak
image: bitnami/keycloak:26.0.0
volumes:
- ./certs/keycloak-key.pem:/opt/keycloak/conf/localhost.key.pem
- ./certs/keycloak-crt.pem:/opt/keycloak/conf/localhost.crt.pem
- ./certs/truststore.jks:/opt/keycloak/conf/truststore.jks
ports:
- "18080:18080"
- "18443:18443"
environment:
KEYCLOAK_HTTP_PORT: 18080
KEYCLOAK_HTTP_RELATIVE_PATH: /auth
KEYCLOAK_DATABASE_HOST: postgres
KEYCLOAK_DATABASE_PASSWORD: "#3]O?4RGj)DE7Z!9SA5"
KEYCLOAK_ADMIN_USER: admin
KEYCLOAK_ADMIN_PASSWORD: admin
KC_HTTPS_CERTIFICATE_KEY_FILE: /opt/keycloak/conf/localhost.key.pem
KC_HTTPS_CERTIFICATE_FILE: /opt/keycloak/conf/localhost.crt.pem
KC_HTTPS_TRUST_STORE_FILE: /opt/keycloak/conf/truststore.jks
KC_HTTPS_TRUST_STORE_PASSWORD: password
KC_HTTPS_CLIENT_AUTH: request
KC_LOG: console
KC_LOG_CONSOLE_LEVEL: all
KC_LOG_LEVEL: DEBUG
KEYCLOAK_HTTPS_PORT: 18443
restart: on-failure
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:18080/auth" ]
interval: 30s
timeout: 15s
retries: 5
start_period: 30s
depends_on:
- postgres