-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
86 lines (86 loc) · 2.18 KB
/
docker-compose.yaml
File metadata and controls
86 lines (86 loc) · 2.18 KB
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
version: "3.3"
services:
web:
image: code.challenge/code-challenge-web:1.0.0
user: "node"
build:
context: front-end
dockerfile: Dockerfile
stdin_open: true
tty: true
command: npm start
restart: on-failure
volumes:
- './front-end:/app'
- '/app/node_modules'
environment:
- NODE_ENV=production
- CHOKIDAR_USEPOLLING=true
depends_on:
- backend
ports:
- "3000:3000"
networks:
- challenge
backend:
hostname: backend
build:
context: back-end
dockerfile: Dockerfile
restart: on-failure
image: code.challenge/code-challenge:1.0.0
ports:
- 8080:8080
networks:
- challenge
zookeeper:
image: 'bitnami/zookeeper:latest'
restart: always
environment:
- ALLOW_ANONYMOUS_LOGIN=yes
networks:
- challenge
kafka:
hostname: kafka
image: 'bitnami/kafka:latest'
depends_on:
- zookeeper
restart: always
environment:
- KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
- KAFKA_CFG_LISTENERS=PLAINTEXT://:9092,PLAINTEXT_HOST://:29092
- KAFKA_CFG_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:29092
- KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=true
ports:
- '9092:9092'
- '29092:29092'
networks:
- challenge
# kafka:
# image: wurstmeister/kafka
# hostname: kafka
# environment:
# KAFKA_CREATE_TOPICS: "candidate-update:1:1,transaction-log:1:1"
# KAFKA_LISTENERS: OUTSIDE://kafka:9092,INSIDE://localhost:9093
# KAFKA_ADVERTISED_LISTENERS: OUTSIDE://kafka:9092,INSIDE://localhost:9093
# KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: OUTSIDE:PLAINTEXT,INSIDE:PLAINTEXT
# KAFKA_INTER_BROKER_LISTENER_NAME: OUTSIDE
# KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
# ports:
# - 9092:9092
# networks:
# - challenge
# depends_on:
# - zookeeper
# zookeeper:
# image: zookeeper:3.6
# restart: always
# ports:
# - 2181:2181
# networks:
# - challenge
networks:
challenge:
driver: bridge