-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
136 lines (125 loc) · 2.53 KB
/
docker-compose.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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: '3'
services:
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
ports:
- 8081:80
container_name: 'frontend'
depends_on:
- gateway
networks:
- voting-system
gateway:
build:
context: ./gateway/src
dockerfile: Dockerfile
container_name: 'gateway'
ports:
- 8080:8080
env_file:
- .env
networks:
- voting-system
user-service:
build:
context: ./user-service
dockerfile: Dockerfile
container_name: 'user-service'
ports:
- 50051:50051
env_file:
- .env
networks:
- voting-system
poll-service:
build:
context: ./poll-service
dockerfile: Dockerfile
container_name: 'poll-service'
ports:
- 50052:50052
env_file:
- .env
networks:
- voting-system
result-service:
build:
context: ./result-service
dockerfile: Dockerfile
container_name: 'result-service'
ports:
- 50053:50053
env_file:
- .env
networks:
- voting-system
vote-producer:
build:
context: ./vote-service/producer
dockerfile: Dockerfile
container_name: 'vote-producer'
ports:
- 50054:50054
depends_on:
- kafka
env_file:
- .env
networks:
- voting-system
vote-consumer:
build:
context: ./vote-service/consumer
dockerfile: Dockerfile
container_name: 'vote-consumer'
depends_on:
- kafka
- vote-producer
env_file:
- .env
networks:
- voting-system
zookeeper:
image: 'bitnami/zookeeper:latest'
ports:
- '2181:2181'
container_name: 'zookeeper'
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
- voting-system
kafka:
image: 'bitnami/kafka:latest'
container_name: 'kafka'
ports:
- '9092:9092'
environment:
- KAFKA_BROKER_ID=1
- KAFKA_ENABLE_KRAFT=no
- KAFKA_LISTENERS=PLAINTEXT://:9092
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CREATE_TOPICS=votes:5:2
depends_on:
- zookeeper
networks:
- voting-system
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: 'nginx'
ports:
- 80:8081
volumes:
- ./nginx/nginx.conf:/etc/nginx/conf.d/nginx.conf:ro
depends_on:
- frontend
- gateway
networks:
- voting-system
networks:
voting-system:
driver: bridge