-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
179 lines (167 loc) · 4.54 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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
---
version: '3.4'
services:
gateway:
image: gchirico1/serveeasy_gateway:latest
container_name: gateway
environment:
SERVER_PORT: 8080
SERVER_ADDRESS: 0.0.0.0
CLIENTE_URI: GestioneCliente
CLIENTE_PORT: 8080
CUCINA_URI: GestioneCucina
CUCINA_PORT: 8080
depends_on:
GestioneCliente:
condition: service_healthy
GestioneCucina:
condition: service_healthy
healthcheck:
test: "curl --fail --silent localhost:8080/actuator/health | grep UP || exit 1"
interval: 20s
timeout: 5s
start_period: 40s
expose:
- "8080"
ports:
- "8083:8080"
GestioneCucina:
image: gchirico1/gestione_cucina:latest
container_name: GestioneCucina
restart: always
environment:
SERVER_PORT: 8080
SERVER_ADDRESS: 0.0.0.0
SPRING_DATASOURCE_URL: jdbc:mariadb://db:3306/serveeasy
SPRING_KAFKA_BOOTSTRAP-SERVERS: broker:29092 #plaintext_internal
depends_on:
broker:
condition: service_healthy
db:
condition: service_healthy
healthcheck:
test: "curl --fail --silent localhost:8080/actuator/health | grep UP || exit 1"
interval: 20s
timeout: 5s
start_period: 40s
expose:
- "8080"
# ports:
# - "8082:8080"
GestioneCliente:
image: gchirico1/gestione_cliente:latest
container_name: GestioneCliente
restart: always
environment:
SERVER_PORT: 8080
SERVER_ADDRESS: 0.0.0.0
SPRING_DATASOURCE_URL: jdbc:mariadb://db:3306/serveeasy
SPRING_KAFKA_BOOTSTRAP-SERVERS: broker:29092 #plaintext_internal
depends_on:
db:
condition: service_healthy
broker:
condition: service_healthy
healthcheck:
test: "curl --fail --silent localhost:8080/actuator/health | grep UP || exit 1"
interval: 20s
timeout: 5s
start_period: 40s
expose:
- "8080"
# ports:
# - "8081:8080"
GestioneComanda:
image: gchirico1/gestione_comanda:latest
container_name: GestioneComanda
restart: always
environment:
SERVER_PORT: 8080
SERVER_ADDRESS: 0.0.0.0
SPRING_DATASOURCE_URL: jdbc:mariadb://db:3306/serveeasy
SPRING_KAFKA_BOOTSTRAP-SERVERS: broker:29092 #plaintext_internal
depends_on:
db:
condition: service_healthy
broker:
condition: service_healthy
healthcheck:
test: "curl --fail --silent localhost:8080/actuator/health | grep UP || exit 1"
interval: 20s
timeout: 5s
start_period: 40s
expose:
- "8080"
# ports:
# - "8080:8080"
zookeeper:
image: confluentinc/cp-zookeeper:7.3.0
container_name: zookeeper
restart: always
environment:
ZOOKEEPER_CLIENT_PORT: 2181
ZOOKEEPER_TICK_TIME: 2000
broker:
image: confluentinc/cp-kafka:7.3.0
container_name: broker
restart: always
ports:
- "9092:9092"
depends_on:
- zookeeper
environment:
KAFKA_BROKER_ID: 1
KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
healthcheck:
test: ["CMD","/usr/bin/kafka-topics","--list","--bootstrap-server","broker:9092"]
interval: 30s
timeout: 30s
retries: 4
kafdrop:
image: obsidiandynamics/kafdrop
container_name: kafdrop
restart: "no"
ports:
- "9000:9000"
environment:
KAFKA_BROKERCONNECT: "broker:29092"
depends_on:
- "broker"
db:
image: mariadb:11.4-rc
container_name: mariadb
restart: always
environment:
MARIADB_ROOT_PASSWORD: root
MARIADB_DATABASE: serveeasy
MARIADB_USER: user
MARIADB_PASSWORD: user
healthcheck:
test: ["CMD","healthcheck.sh","--su-mysql","--connect","--innodb_initialized"]
interval: 30s
retries: 3
timeout: 30s
volumes:
- ./db/initial-data-and-schema.sql:/docker-entrypoint-initdb.d/initial-data-and-schema.sql
- ./db/db_data/:/var/lib/mysql
# ports:
# - "3306:3306"
phpmyadmin:
image: phpmyadmin:5.2.1-apache
container_name: phpmyadmin
restart: always
ports:
- "3307:80"
environment:
PMA_HOST: db
PMA_PORT: 3306
PMA_USER: root
PMA_PASSWORD: root
depends_on:
db:
condition: service_healthy