-
Notifications
You must be signed in to change notification settings - Fork 203
/
Makefile
102 lines (84 loc) · 1.45 KB
/
Makefile
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
include bot/.env
export $(shell sed 's/=.*//' bot/.env)
current_dir := $(shell pwd)
user := $(shell whoami)
ENDPOINTS = endpoints.yml
CREDENTIALS = credentials.yml
# CLEAR PROJECT
clean:
make down
cd bot/ && sudo make clean
down:
docker compose down
# RUN
init:
make build
make train
make webchat
logs:
docker compose logs \
-f
build:
export $(grep -v '^#' env/bot.env | xargs)
docker compose build \
--no-cache bot
shell:
docker compose run \
--rm \
--service-ports \
bot \
make shell ENDPOINTS=$(ENDPOINTS)
api:
docker compose run \
--rm \
--service-ports \
bot \
make api ENDPOINTS=$(ENDPOINTS) CREDENTIALS=$(CREDENTIALS)
actions:
docker compose run \
--rm \
--service-ports \
bot \
make actions
webchat:
echo "Executando Bot com Webchat."
docker compose run \
-d \
--service-ports \
bot \
make webchat ENDPOINTS=$(ENDPOINTS) CREDENTIALS=$(CREDENTIALS)
docker compose up \
-d \
webchat
echo "Acesse o WEBCHAT em: http://localhost:5000"
telegram:
docker compose run \
-d \
--rm \
--service-ports \
bot-telegram \
make telegram ENDPOINTS=$(ENDPOINTS) CREDENTIALS=$(CREDENTIALS)
# DEVELOPMENT
train:
docker compose run \
--rm \
bot \
make train
validate:
docker compose run \
--rm bot \
make validate
test:
docker compose run \
--rm bot \
make test
test-nlu:
docker compose run \
--rm \
bot \
make test-nlu
test-core:
docker compose run \
--rm \
bot \
make test-core