-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
39 lines (35 loc) · 1.01 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
services:
keycloak:
image: quay.io/keycloak/keycloak:latest
container_name: keycloak
# Use Keycloak's new distribution with `start-dev`.
command: start-dev --http-port=8080
environment:
# Set the administrative username and password
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
# Optional: connect to the external Postgres DB
KC_DB: postgres
KC_DB_URL_HOST: postgres
KC_DB_USERNAME: keycloak
KC_DB_PASSWORD: secret
# Optionally specify the Keycloak DB name here if needed.
# If not, the default database set up in Postgres container is used.
# KC_DB_URL_DATABASE: keycloak
ports:
- "8080:8080"
depends_on:
- postgres
postgres:
image: postgres:15-alpine
container_name: postgres
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: secret
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data: