-
Notifications
You must be signed in to change notification settings - Fork 6
/
Makefile
83 lines (72 loc) · 2.07 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
.PHONY:
help
lock-deps
shell
autotests
lint
build
envfile
runserver
runserver-uvicorn
.DEFAULT_GOAL := help
help: ## List all commands
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
OVERRIDE=`test -f deploy/docker-compose.override.yml && \
echo '-f deploy/docker-compose.override.yml'`
lock-deps: ## Make poetry.lock
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.develop.yml \
${OVERRIDE} \
--project-directory . \
run --rm kesha poetry lock
shell: ## Shell (bash) intro the app's container
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.db.yml \
-f deploy/docker-compose.develop.yml \
${OVERRIDE} \
--project-directory . \
run --rm kesha bash
autotests: ## Start project's tests on docker
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.db.yml \
-f deploy/docker-compose.autotests.yml \
${OVERRIDE} \
--project-directory . \
run --rm kesha-tests
lint: ## Start project's lint on docker
docker-compose \
-f deploy/docker-compose.yml \
${OVERRIDE} \
--project-directory . \
run \
--rm \
--volume "$$(pwd):/app/src:z" \
kesha flake8 --count
build: envfile ## Build docker image
docker-compose \
-f deploy/docker-compose.yml \
${OVERRIDE} \
--project-directory . \
build kesha
envfile: ## Generate env file with variables with prefix KESHA_
$(shell env | egrep '^KESHA_' > .gen.env && echo '.gen.env has been generated' || touch .gen.env)
$(shell test -f .env && cat .env > .gen.env)
runserver: envfile ## Local startup the app on docker with required services
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.db.yml \
-f deploy/docker-compose.develop.yml \
${OVERRIDE} \
--project-directory . \
up
runserver-uvicorn: envfile ## Local startup the app on docker with uvicorn
docker-compose \
-f deploy/docker-compose.yml \
-f deploy/docker-compose.db.yml \
${OVERRIDE} \
--project-directory . \
up