forked from lappis-unb/rasa-ptbr-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 27
/
docker-compose.yml
164 lines (151 loc) · 4.03 KB
/
docker-compose.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
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
155
156
157
158
159
160
161
162
163
164
version: '2'
services:
# =============================== Coach =================================
# All the models are trained by this coach.
coach:
build:
context: .
dockerfile: ./docker/bot.Dockerfile
volumes:
- ./bot/models/:/bot/models/
command: "make train"
# ================================= Bot =====================================
# Generic Rasa bot, used to run console for example.
bot:
build:
context: .
dockerfile: ./docker/bot.Dockerfile
restart: unless-stopped
volumes:
- ./bot/:/bot/
ports:
- 5004:5004
depends_on:
- actions
# ================================= RASA X ==================================
# Rasa X container
x:
build:
context: .
dockerfile: ./docker/bot.Dockerfile
restart: unless-stopped
volumes:
- ./bot/:/bot/
ports:
- 5002:5002
depends_on:
- actions
command: sh -c "make x"
# ================================= Actions =================================
# Rasa middleware used to connect with external APIs.
actions:
build:
context: .
dockerfile: ./docker/actions.Dockerfile
ports:
- 5055:5055
volumes:
- ./bot/actions:/bot/actions
command: sh -c "make actions"
# ============================ WebChat Bot =================================
# Specific Rasa bot integrated with WebChat.
bot-webchat:
build:
context: .
dockerfile: ./docker/bot.Dockerfile
volumes:
- ./bot/:/bot/
ports:
- 5005:5005
depends_on:
- actions
command: sh -c "make webchat"
# =============================== Analytics =================================
# Analitics ElasticSearch Stack.
elasticsearch:
build:
context: .
dockerfile: ./docker/elasticsearch.Dockerfile
restart: unless-stopped
ports:
- 9200:9200
- 9300:9300
env_file:
- env/elasticsearch.env
volumes:
- esbackup:/usr/share/elasticsearch/backup
- ./modules/elasticsearch/elasticsearch.yml:/usr/share/elasticsearch/config/elasticsearch.yml
- esdata:/usr/share/elasticsearch/data
# Visualization layer of Analitics Stack.
kibana:
build:
context: .
dockerfile: ./docker/kibana.Dockerfile
restart: unless-stopped
ports:
- 5601:5601
env_file:
- env/kibana.env
depends_on:
- elasticsearch
volumes:
- ./modules/analytics:/usr/share/kibana/analytics
# =============================== Broker ====================================
# Custom broker to store Rasa tracker data.
rabbitmq:
image: rabbitmq:3-management
restart: unless-stopped
volumes:
- ./db/rabbitmq:/var/lib/rabbitmq/mnesia
ports:
- 15672:15672
env_file:
- env/rabbitmq.env
# Custom broker consumer responsible to store data into ElasticSearch.
rabbitmq-consumer:
build:
context: .
dockerfile: ./docker/consumer.Dockerfile
restart: unless-stopped
volumes:
- ./modules/rabbitmq/consumer/:/opt/scripts/
depends_on:
- rabbitmq
env_file:
- env/rabbitmq-consumer.env
command: python3 /opt/scripts/consume_bot_messages.py
# ============================ Telegram Bot =================================
# Specific Rasa bot integrated with Telegram.
bot_telegram:
build:
context: .
dockerfile: ./docker/bot.Dockerfile
volumes:
- ./bot/:/bot/
env_file:
- env/bot-telegram.env
ports:
- 5001:5001
depends_on:
- actions
command: sh -c "make telegram"
# =============================== Notebooks =================================
# Rasa lab to enhance hyperparameters.
notebooks:
build:
context: .
dockerfile: ./docker/notebooks.Dockerfile
env_file:
- env/notebooks.env
volumes:
- ./modules/notebooks:/work/notebooks
- ./bot/:/bot/
ports:
- 8888:8888
volumes:
notebook_models:
mongo_data:
rabbit_data:
esbackup:
esdata:
driver: local