-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yaml
155 lines (143 loc) · 3.18 KB
/
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
version: '3.8'
services:
# Zookeeper service
zookeeper:
image: confluentinc/cp-zookeeper:latest
environment:
ZOOKEEPER_CLIENT_PORT: 2181
networks:
- kafka-network
restart: always
# Kafka service
kafka:
image: confluentinc/cp-kafka:latest
depends_on:
- zookeeper
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
networks:
- kafka-network
- elk-network
restart: always
# Redis service
redis:
image: 'redis:latest'
container_name: 'redis'
command: redis-server --save 300 1 --dir /data --dbfilename redis.rdb --appendonly no
volumes:
- redis-data:/data
ports:
- "6379:6379"
networks:
- redis-network
restart: always
# Environment-Agent service
game:
build:
context: ./game
dockerfile: Dockerfile
target: production
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu]
environment:
- CONFIG_log_level=ERROR
networks:
- kafka-network
- redis-network
volumes:
- model_store:/usr/share/model_store
- logs:/usr/share/logs
depends_on:
- zookeeper
- kafka
- redis
# Memory-Monitor service
monitor:
build:
context: ./monitor
dockerfile: Dockerfile
target: production
networks:
- kafka-network
- redis-network
volumes:
- logs:/usr/share/logs
depends_on:
- zookeeper
- kafka
- redis
restart: always
# Logstash service
logstash:
image: vungle/logstash-kafka-es:latest
# image: docker.elastic.co/logstash/logstash:7.17.14
volumes:
- ./logstash/config:/logstash/config
- ./logstash/config-tmpl:/logstash/config-tmpl
depends_on:
- zookeeper
- kafka
- elasticsearch
networks:
- kafka-network
- elk-network
# Elasticsearch service
elasticsearch:
image: docker.elastic.co/elasticsearch/elasticsearch:7.17.14
volumes:
- esdata:/usr/share/elasticsearch/data
environment:
- bootstrap.memory_lock=true
- discovery.type=single-node
- "ES_JAVA_OPTS=-Xms512m -Xmx512m"
ulimits:
memlock:
soft: -1
hard: -1
mem_limit: 2g
networks:
- elk-network
ports:
- 9200:9200
healthcheck:
test: ["CMD", "curl","-s" ,"-f", "http://localhost:9200/_cat/health"]
# Kibana service
kibana:
image: docker.elastic.co/kibana/kibana:7.17.14
ports:
- "5601:5601"
depends_on:
elasticsearch: { condition: service_healthy }
restart: on-failure
networks:
- elk-network
volumes:
- ./kibana:/usr/local/kibana
command: /usr/local/kibana/kibana_startup.sh
networks:
kafka-network:
driver: bridge
redis-network:
driver: bridge
elk-network:
driver: bridge
volumes:
model_store:
driver: local
redis-data:
driver: local
esdata:
driver: local
logs:
driver: local
driver_opts:
type: none
o: bind
device: ./logs