forked from ivangfr/springboot-react-keycloak
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (39 loc) · 1016 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:5.0.7
container_name: mongodb
ports:
- "27017:27017"
healthcheck:
test: echo 'db.stats().ok' | mongo localhost:27017/moviesdb --quiet
mysql:
image: mysql:5.7.37
container_name: mysql
ports:
- "3306:3306"
environment:
- MYSQL_DATABASE=keycloak
- MYSQL_USER=keycloak
- MYSQL_PASSWORD=password
- MYSQL_ROOT_PASSWORD=root_password
healthcheck:
test: "mysqladmin ping -u root -p$${MYSQL_ROOT_PASSWORD}"
keycloak:
image: quay.io/keycloak/keycloak:18.0.0
container_name: keycloak
environment:
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_DB=mysql
- KC_DB_URL_HOST=mysql
- KC_DB_URL_DATABASE=keycloak
- KC_DB_USERNAME=keycloak
- KC_DB_PASSWORD=password
ports:
- "8080:8080"
command: start-dev
depends_on:
- mysql
healthcheck:
test: "curl -f http://localhost:8080/admin || exit 1"