forked from ivangfr/springboot-react-keycloak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
43 lines (39 loc) · 1006 Bytes
/
docker-compose.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
version: "3.8"
services:
mongodb:
image: mongo:6.0.4
container_name: mongodb
ports:
- "27017:27017"
healthcheck:
test: echo 'db.stats().ok' | mongosh localhost:27017/moviesdb --quiet
postgres:
image: postgres:15.2
container_name: postgres
ports:
- "5432:5432"
environment:
- POSTGRES_DB=keycloak
- POSTGRES_USER=keycloak
- POSTGRES_PASSWORD=password
healthcheck:
test: "pg_isready -U postgres"
keycloak:
image: quay.io/keycloak/keycloak:21.0.1
container_name: keycloak
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB=postgres
- KC_DB_URL_HOST=postgres
- KC_DB_URL_DATABASE=keycloak
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=password
- KC_HEALTH_ENABLED=true
ports:
- "8080:8080"
command: start-dev
depends_on:
- postgres
healthcheck:
test: "curl -f http://localhost:8080/health/ready || exit 1"