forked from DAVFoundation/missioncontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.ec2.yml
109 lines (108 loc) · 2.97 KB
/
docker-compose.ec2.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
version: '3.5'
services:
nginx:
build:
context: .
dockerfile: ./dockers/Dockerfile.nginx
image: dav_network_nginx
container_name: dav_network_nginx
depends_on:
- app
volumes:
- ./nginx/app.template:/etc/nginx/conf.d/app.template
ports:
- "80:80"
networks:
- dav_network
environment:
- NGINX_HOST=localhost
- NGINX_PORT=80
- WEB_REVERSE_PROXY_PORT=3005
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/app.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"
restart: always
app:
build:
context: .
dockerfile: ./dockers/Dockerfile.app
image: dav_network_app
container_name: dav_network_app
command: nodemon --watch 'src/**/*.ts' --ignore 'src/**/*.spec.ts' --exec 'ts-node' src/index.ts --inspect 9229
restart: always
networks:
- dav_network
depends_on:
- zookeeper
- kafka
- cassandra
volumes:
- /app/node_modules
- .:/app
zookeeper:
build:
context: .
dockerfile: ./dockers/Dockerfile.zookeeper
image: dav_network_zookeeper
container_name: dav_network_zookeeper
networks:
- dav_network
ports:
- "2181:2181"
- "2888:2888"
- "3888:3888"
# environment:
# ZOO_MY_ID: 1
# ZOO_SERVERS: server.1=0.0.0.0:2888:3888 server.2=zookeeper2:2888:3888
# SERVERS: 52.71.196.240:2181
cassandra:
build:
context: .
dockerfile: ./dockers/Dockerfile.cassandra
image: dav_network_cassandra
container_name: dav_network_cassandra
## to change container version or tag using args uncomment following lines
# args:
# ver: 1
ports:
- '7000:7000'
- '7001:7001'
- '7199:7199'
- '9042:9042'
- '9160:9160'
restart: always
volumes:
- ./data/cassandra:/var/lib/cassandra
networks:
- dav_network
environment:
CASSANDRA_CLUSTER_NAME: dcluster
CASSANDRA_BROADCAST_ADDRESS: ${BROADCAST_ADDRESS}
# CASSANDRA_SEEDS: ${CASSANDRA_SEEDS}
kafka:
build:
context: .
dockerfile: ./dockers/Dockerfile.kafka
image: dav_network_kafka
container_name: dav_network_kafka
links:
- cassandra:cassandra
- zookeeper:zookeeper
ports:
- "9092:9092"
networks:
- dav_network
environment:
# HOSTNAME_COMMAND: "route -n | awk '/UG[ \t]/{print $$2}'"
# for AWS use:
# HOSTNAME_COMMAND: "curl http://169.254.169.254/latest/meta-data/public-ipv4"
KAFKA_LOG_DIRS: /kafka
# KAFKA_BROKER_ID: 1
# KAFKA_CREATE_TOPICS: test-topic-1:1:2,test-topic-2:1:2,test-topic-3:1:2
# KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'false'
KAFKA_ADVERTISED_HOST_NAME: ${BROADCAST_ADDRESS}
KAFKA_ADVERTISED_PORT: 9092
KAFKA_LOG_RETENTION_HOURS: "168"
KAFKA_LOG_RETENTION_BYTES: "100000000"
KAFKA_ZOOKEEPER_CONNECT: ${ZOOKEEPER_ADDRESS}:2181
networks:
dav_network:
name: dav_network