-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.override2.yaml
119 lines (110 loc) · 2.9 KB
/
docker-compose.override2.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
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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
services:
log_db:
image: postgres
container_name: log_db_container_rm
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: logdb
ports:
- "5003:5432"
healthcheck:
test: "exit 0"
rabbitmq:
build:
dockerfile_inline: |
FROM rabbitmq:3-management
RUN rabbitmq-plugins enable --offline rabbitmq_mqtt
environment:
RABBITMQ_DEFAULT_USER: rabbitmq-user
RABBITMQ_DEFAULT_PASS: password
healthcheck:
test: rabbitmq-diagnostics -q ping
interval: 30s
timeout: 30s
retries: 3
ports:
- 1883:1883
mediative-module:
build:
context: ../mediative-module/.
environment:
MQTT_CLIENT_USERNAME: rabbitmq-user
MQTT_CLIENT_PASSWORD: password
MQTT_BROKER_URL: tcp://rabbitmq:1883
KAFKA_BROKER_ADDRESS: kafka_container:9092
SPRING_DATASOURCE_URL: jdbc:postgresql://log_db:5432/logdb
SPRING_DATASOURCE_USERNAME: postgres
SPRING_DATASOURCE_PASSWORD: password
ports:
- "8082:8082"
depends_on:
kafka:
condition: service_started
log_db:
condition: service_healthy
rabbitmq:
condition: service_healthy
central-module:
build:
context: ../central-module/.
environment:
KAFKA_BROKER_ADDRESS: kafka_container:9092
CALCULATION_DATABASE_APPLICATION_ADDRESS: http://calculations-db-access:8090
MEDIATIVE_MODULE_APPLICATION_ADDRESS: http://mediative-module:8082
depends_on:
kafka:
condition: service_started
calculations-db-access:
condition: service_started
ports:
- "8081:8080"
kafka:
image: wurstmeister/kafka
container_name: kafka_container
restart: no
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://:9092
KAFKA_ADVERTISED_HOST_NAME: 127.0.0.1
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
depends_on:
- zookeeper
zookeeper:
image: zookeeper:3.8.2
container_name: zookeeper
restart: no
volumes:
- /data/zookeeper
ports:
- "2181:2181"
calculations-db:
image: postgres:latest
healthcheck:
test: exit 0
environment:
POSTGRES_USER: calculations-user
POSTGRES_PASSWORD: password
POSTGRES_DB: calculations-db
ports:
- 6432:5432
calculations-db-access:
depends_on:
calculations-db:
condition: service_healthy
build:
context: ../calculationsdb-access/.
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://calculations-db:5432/calculations-db
SPRING_DATASOURCE_USERNAME: calculations-user
SPRING_DATASOURCE_PASSWORD: password
ports:
- 8090:8090
real-time-calculations:
depends_on:
calculations-db-access:
condition: service_started
central-module:
condition: service_started