forked from Phuks-co/throat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
42 lines (35 loc) · 779 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
CUR_DIR=$(shell pwd)
NPM_CMD?=install
.PHONY: docker-compose-build
docker-npm:
docker run \
-v $(CUR_DIR):/throat \
-w /throat node:14-buster-slim \
npm $(NPM_CMD)
docker-compose-build:
docker-compose build
@$(DONE)
.PHONY: up
up: docker-compose-build
docker-compose up --remove-orphans -d
@$(DONE)
.PHONY: down
down:
docker-compose down --remove-orphans
@$(DONE)
.PHONY: docker-shell
docker-shell: docker-compose-build
docker-compose run --rm throat /bin/bash
@$(DONE)
.PHONY: test
test: docker-compose-build
docker-compose up --detach redis
docker-compose run \
--name=throat_tests \
--rm \
--no-deps \
--volume $(CUR_DIR)/test:/throat/test \
-e TEST_CONFIG=/throat/test/test_config_docker_compose.yaml \
throat \
pytest $(ARGS)
@$(DONE)