-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
68 lines (63 loc) · 1.45 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
services:
backend:
build: .
container_name: wnet_backend
restart: unless-stopped
ports:
- 8080:8080
environment:
POSTGRES_HOST: database
MAIL_HOST: ${MAIL_HOST}
MAIL_PORT: ${MAIL_PORT}
MAIL_USERNAME: ${MAIL_USERNAME}
MAIL_PASSWORD: ${MAIL_PASSWORD}
KAFKA_HOST: kafka
depends_on:
database:
condition: service_healthy
networks:
- wnet-net
database:
image: postgres
container_name: wnet_database
restart: unless-stopped
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: wnetdb
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
timeout: 10s
retries: 5
networks:
- wnet-net
zookeeper:
container_name: zookeeper
image: "bitnami/zookeeper:latest"
networks:
- wnet-net
ports:
- "2181:2181"
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
kafka:
container_name: kafka
image: "bitnami/kafka:latest"
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: "1"
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_ADVERTISED_HOST_NAME: "localhost"
KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
ALLOW_PLAINTEXT_LISTENER: "yes"
KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
depends_on:
- zookeeper
networks:
- wnet-net
networks:
wnet-net:
driver: bridge