-
Notifications
You must be signed in to change notification settings - Fork 2
/
keycloak.yml
55 lines (52 loc) · 1.58 KB
/
keycloak.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
55
version: '3.7'
services:
keycloak:
image: jboss/keycloak:10.0.2
entrypoint:
- '/bin/bash'
- '-c'
- '/opt/jboss/tools/docker-entrypoint.sh $$@'
command:
- "--"
- "-b 0.0.0.0"
environment:
- DB_VENDOR=mariadb
- DB_ADDR=mariadb-kc.${INTERNAL_DOMAIN:-internal.test}
- DB_DATABASE=keycloak
- DB_USER=keycloak
- DB_PASSWORD=password
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=password
- PROXY_ADDRESS_FORWARDING=true
volumes:
- /etc/localtime:/etc/localtime:ro
depends_on:
- mariadb-kc
hostname: keycloak.${INTERNAL_DOMAIN:-internal.test}
networks:
default:
aliases:
- keycloak.${INTERNAL_DOMAIN:-internal.test}
labels:
- "traefik.enable=true"
- "traefik.http.services.keycloak.loadbalancer.server.port=8080"
- "traefik.http.routers.keycloak.rule=Host(`keycloak.${EXTERNAL_DOMAIN:-external.test}`)"
- "traefik.http.routers.keycloak.entrypoints=websecure"
- "traefik.http.routers.keycloak.tls=true"
mariadb-kc:
image: mariadb:10.4.13
volumes:
- /etc/localtime:/etc/localtime:ro
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
- MYSQL_PASSWORD=password
# https://github.com/docker-library/mariadb/issues/261
# https://github.com/docker-library/mariadb/issues/262
- MYSQL_INITDB_SKIP_TZINFO=true
hostname: mariadb-kc.${INTERNAL_DOMAIN:-internal.test}
networks:
default:
aliases:
- mariadb-kc.${INTERNAL_DOMAIN:-internal.test}