-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
45 lines (31 loc) · 796 Bytes
/
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
# SMS Bot
# Author: Daniel Nicolas Gisolfi
image=sms_bot
hub_image=dgisolfi/sms_bot
container=sms_bot
version=2.0
all: clean build run
dev: clean build dev_bot
push: clean build publish
intro:
@echo "\n SMS Bot v$(version)"
clean:
-docker kill $(container)_dev
-docker kill $(container)_prod
-docker rmi $(image)
-docker rmi $(hub_image)
# rebuild image
build: intro clean
@docker build -t $(image) .
run:
@docker run -it --rm --name $(container)_prod $(hub_image)
# build development enviorment
dev_bot: intro build
@docker run -it --rm --name $(container)_dev -v ${PWD}:/DEV $(image) bash
test:
python3 -m pytest
publish:
@echo "\n pushing $(hub_image) to DockerHub"
@docker tag ${image} ${hub_image}:latest
@docker push ${hub_image}
.PHONY: test clean