forked from dheerajck/developers_of_kerala_backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
50 lines (38 loc) · 1.02 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
SHELL := /bin/bash
# Variables definitions
# -----------------------------------------------------------------------------
ifeq ($(TIMEOUT),)
TIMEOUT := 60
endif
# Target section and Global definitions
# -----------------------------------------------------------------------------
all: clean test install run deploy down
test:
poetry run pytest tests -vv --show-capture=all
install: generate_dot_env
pip install --upgrade pip
pip install poetry
poetry install --with dev
run:
PYTHONPATH=app/ poetry run uvicorn app.main:app --reload --host 0.0.0.0 --port 8080
deploy: generate_dot_env
docker-compose build
docker-compose up -d
down:
docker-compose down
generate_dot_env:
@if [[ ! -e .env ]]; then \
cp .env.sample .env; \
fi
clean:
@find . -name '*.pyc' -exec rm -rf {} \;
@find . -name '__pycache__' -exec rm -rf {} \;
@find . -name 'Thumbs.db' -exec rm -rf {} \;
@find . -name '*~' -exec rm -rf {} \;
rm -rf .cache
rm -rf build
rm -rf dist
rm -rf *.egg-info
rm -rf htmlcov
rm -rf .tox/
rm -rf docs/_build