-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.keycloak.yml
42 lines (41 loc) · 1.36 KB
/
docker-compose.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
version: '3.2'
services:
keycloakdb:
image: postgres:10.17
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
healthcheck:
test: "exit 0"
# Example if you want to add some init data
#volumes:
# - ./keycloak/import/init.sql:/docker-entrypoint-initdb.d/init.sql
ports:
- "5432"
# There is one example user in the init.sql file for the app realm with username: user and password: user1. For admin user, you can use the environment variables KEYCLOAK_ADMIN and KEYCLOAK_ADMIN_PASSWORD
keycloak:
image: quay.io/keycloak/keycloak:23.0.6
command: start-dev
environment:
KC_DB_URL: "jdbc:postgresql://keycloakdb:5432/keycloak"
KC_DB: postgres
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: password
KEYCLOAK_ADMIN: admin # This is maybe overwritten by the init.sql file
KEYCLOAK_ADMIN_PASSWORD: admin1 # This is maybe overwritten by the init.sql file
KC_HOSTNAME: keycloak-local
KC_HTTP_ENABLED: true
KC_HOSTNAME_STRICT_HTTPS: false
# Example if you want some example providers e.g. themes
#volumes:
# - ./keycloak/extensions:/opt/keycloak/providers
depends_on:
keycloakdb:
condition: service_healthy
networks:
default:
aliases:
- keycloak-local
ports:
- "8080:8080"