-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathMakefile
More file actions
69 lines (52 loc) · 1.06 KB
/
Makefile
File metadata and controls
69 lines (52 loc) · 1.06 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
61
62
63
64
65
66
67
68
69
image = rtechsupport/techsupport-bot
full-image = $(image):prod
main_dir = techsupport_bot
ifeq ($(shell docker-compose -v > /dev/null 2>&1; echo $$?), 0)
DOCKER_COMPOSE_CMD := docker-compose
else
DOCKER_COMPOSE_CMD := docker compose
endif
make sync:
python3 -m pipenv sync -d
check-format:
black --check ./
isort --check-only ./ --profile black
format:
black ./
isort ./ --profile black
lint:
pylint $(shell git ls-files '*.py')
test:
PYTHONPATH=./techsupport_bot pytest techsupport_bot/tests/ -p no:warnings
build:
make establish_config
docker build -t $(full-image) -f Dockerfile .
rebuild:
make build
make start
devbuild:
make format
make rebuild
make logs
start:
$(DOCKER_COMPOSE_CMD) up -d
update:
$(DOCKER_COMPOSE_CMD) down
$(DOCKER_COMPOSE_CMD) up -d --build
clean:
docker system prune --volumes -af
down:
$(DOCKER_COMPOSE_CMD) down
reset:
make down
make clean
make build
make start
restart:
$(DOCKER_COMPOSE_CMD) restart
logs:
docker logs discordBot -f
establish_config:
@if [ ! -f "./config.yml" ]; then\
touch ./config.yml;\
fi