-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
84 lines (83 loc) · 2.22 KB
/
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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: '3'
services:
backend:
container_name: backend
image: ${BACKEND_IMAGE}:${BACKEND_TAG}
ports:
- 8080:8080
environment:
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/backend
- SPRING_DATASOURCE_USERNAME=postgres
- SPRING_DATASOURCE_PASSWORD=postgres
restart: unless-stopped
depends_on:
- postgres
- mosquitto
postgres:
container_name: postgres
image: ${DB_IMAGE}:${DB_TAG}
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=backend
restart: unless-stopped
keycloak:
image: ${KEYCLOAK_IMAGE}:${KEYCLOAK_TAG}
restart: on-failure
command:
- "-b"
- "0.0.0.0"
- "-Dkeycloak.migration.action=import"
- "-Dkeycloak.migration.provider=singleFile"
- "-Dkeycloak.migration.file=/config/import.json"
- "-Dkeycloak.migration.strategy=IGNORE_EXISTING"
- "-Dkeycloak.migration.usersExportStrategy=SAME_FILE"
volumes:
- ./config:/config/
environment:
- KEYCLOAK_USER=admin
- KEYCLOAK_PASSWORD=password
- KEYCLOAK_FRONTEND_URL=http://localhost:8081/auth/
- DB_VENDOR=postgres
- DB_USER=admin
- DB_PASSWORD=password
- DB_ADDR=keycloak-db
- DB_PORT=5432
- DB_DATABASE=keycloakdb
ports:
- 8081:8080
depends_on:
- keycloak-db
keycloak-db:
image: ${KEYCLOAK_DB_IMAGE}:${KEYCLOAK_DB_TAG}
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: password
POSTGRES_DB: keycloakdb
volumes:
- keycloak-pgdata:/var/lib/postgresql/data
mosquitto:
container_name: mosquitto
image: ${MOSQUITTO_IMAGE}:${MOSQUITTO_TAG}
ports:
- 1883:1883
- 9001:9001
volumes:
- mosquitto-data:/mosquitto/data
- mosquitto-logs:/mosquitto/logs
- ./mosquitto/mosquitto.passwd:/mosquitto/config/mosquitto.passwd
- ./mosquitto/mosquitto.conf:/mosquitto/config/mosquitto.conf
restart: unless-stopped
volumes:
postgres-data:
driver: local
keycloak-pgdata:
driver: local
mosquitto-data:
driver: local
mosquitto-logs:
driver: local