-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
46 lines (42 loc) · 1.32 KB
/
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
services:
keycloak:
image: quay.io/keycloak/keycloak:26.0
ports:
- "8009:8009"
environment:
KEYCLOAK_ADMIN: "admin"
KEYCLOAK_ADMIN_PASSWORD: "admin"
# local database for testing
DB_VENDOR: "h2"
KC_HOSTNAME_STRICT: "false"
KC_HTTP_ENABLED: "true"
KC_HTTP_PORT: "8009"
KC_HEALTH_ENABLED: "true"
volumes:
- keycloak-h2-db:/opt/keycloak/data/h2/
- ./keycloak/data/import/:/opt/keycloak/data/import/
command: start-dev --import-realm
healthcheck:
test: set -e && exec 3<>/dev/tcp/localhost/9000 && echo -e GET /health/ready HTTP/1.0 >&3 && echo >&3 && timeout --preserve-status 1 cat <&3 | grep -m 1 status | grep -m 1 UP
interval: 10s
timeout: 5s
retries: 10
oauth2-proxy:
image: quay.io/oauth2-proxy/oauth2-proxy:v7.7.0
env_file: oauth2-proxy.env
ports:
- "4180:4180"
depends_on:
keycloak:
condition: service_healthy
oauth2-proxy-redis-cache:
condition: service_started
oauth2-proxy-redis-cache:
image: redis:6.2-alpine
restart: always
command: redis-server --save 20 1 --loglevel warning --requirepass ${OAUTH2_PROXY_REDIS_PASSWORD:-weakredispassword}
volumes:
- oauth2-proxy-redis-cache-data:/data
volumes:
keycloak-h2-db:
oauth2-proxy-redis-cache-data: