This repository was archived by the owner on May 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
81 lines (70 loc) · 2.06 KB
/
Makefile
File metadata and controls
81 lines (70 loc) · 2.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
70
71
72
73
74
75
76
77
78
79
80
81
.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 parrot-app 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 parrot-app 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 parrot-app-tests
lint: ## Start project's lint on docker
docker-compose \
-f deploy/docker-compose.yml \
${OVERRIDE} \
--project-directory . \
run --rm parrot-app \
flake8 --count
build: ## Build docker image
docker-compose \
-f deploy/docker-compose.yml \
${OVERRIDE} \
--project-directory . \
build parrot-app
envfile: ## Generate env file with variables with prefix PARROT_
$(shell env | egrep '^PARROT_' > .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