-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
60 lines (42 loc) · 1.89 KB
/
Makefile
File metadata and controls
60 lines (42 loc) · 1.89 KB
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
# Default values (override with .env file / environment variables)
NICOBOT_IMAGE?= nicolabs/nicobot
check:
echo ${NICOBOT_IMAGE}
clean:
rm -rf build
build:
pip3 install --upgrade -c constraints.txt -r requirements-build.txt -r requirements-runtime.txt
python3 setup.py build sdist bdist_wheel
docker-build-alpine:
# E.g. ARGS="-v debug" make docker-build-alpine
docker build -t ${NICOBOT_IMAGE}:dev-alpine -f alpine.Dockerfile $(ARGS) .
docker-build-debian:
docker build -t ${NICOBOT_IMAGE}:dev-debian -f debian.Dockerfile $(ARGS) .
docker-build-debian-signal: docker-build-debian
docker build -t ${NICOBOT_IMAGE}:dev-signal-debian --build-arg NICOBOT_DEPLOY_BASE_IMAGE=${NICOBOT_IMAGE}:dev-debian -f signal-debian.Dockerfile $(ARGS) .
docker-build-all: docker-build-debian docker-build-debian-signal docker-build-alpine
compose-build:
docker-compose -f tests/transbot-sample-conf/docker-compose.yml ${ARGS} build
compose-up:
docker-compose -f tests/transbot-sample-conf/docker-compose.yml ${ARGS} up --build
compose-down:
docker-compose -f tests/transbot-sample-conf/docker-compose.yml ${ARGS} down
aws-up:
# E.g. ARGS="--env-file /home/me/deploy/nicobot-aws-prod.env" make aws-up
docker compose -f tests/transbot-sample-conf/docker-compose.yml ${ARGS} up
aws-down:
# E.g. ARGS="--env-file /home/me/deploy/nicobot-aws-prod.env" make aws-down
docker compose -f tests/transbot-sample-conf/docker-compose.yml ${ARGS} down
test:
python3 -m unittest discover -v -s tests
askbot:
python3 -m nicobot.askbot $(ARGS)
transbot:
python3 -m nicobot.transbot $(ARGS)
docker-askbot:
docker run --rm -it ${NICOBOT_IMAGE}:dev-signal-debian askbot $(ARGS)
docker-transbot:
docker run --rm -it ${NICOBOT_IMAGE}:dev-signal-debian transbot $(ARGS)
# All targets might be declared phony, since this Makefile is just a helper
# However most just don't match a file/directory so they will work without it
.PHONY: build test