-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yml
87 lines (81 loc) · 1.79 KB
/
docker-compose-prod.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
version: "3.9"
services:
zookeeper:
image: zookeeper:3.4.9
ports:
- "2181:2181"
environment:
ZOO_MY_ID: 1
ZOO_PORT: 2181
ZOO_SERVERS: server.1=zookeeper:2888:3888
networks:
- web_nw
kafka:
image: confluentinc/cp-kafka:5.5.1
ports:
- "9092:9092"
environment:
KAFKA_ADVERTISED_LISTENERS: LISTENER_DOCKER_INTERNAL://kafka:19092,LISTENER_DOCKER_EXTERNAL://kafka:9092
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: LISTENER_DOCKER_INTERNAL:PLAINTEXT,LISTENER_DOCKER_EXTERNAL:PLAINTEXT
KAFKA_INTER_BROKER_LISTENER_NAME: LISTENER_DOCKER_INTERNAL
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
depends_on:
- zookeeper
networks:
- web_nw
mongo:
image: mongo
restart: always
env_file:
- ./.env
networks:
- web_nw
server:
build:
context: ./server
dockerfile: Dockerfile-prod
volumes:
- ./server:/server
- /server/node_modules
links:
- mongo
env_file:
- ./.env
networks:
- web_nw
command: sh -c "dockerize -wait tcp://kafka:9092 npm start"
depends_on:
- kafka
- mongo
client:
build:
context: ./client
dockerfile: Dockerfile-prod
volumes:
- ./client:/client
- /client/node_modules
- build-react:/client/build
env_file:
- ./.env
nginx:
build:
context: ./nginx
dockerfile: Dockerfile.prod
volumes:
- build-react:/web
depends_on:
- server
- client
ports:
- "80:80"
- "5000:5000"
networks:
- web_nw
networks:
web_nw:
driver: bridge
volumes:
build-react: