-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
executable file
·49 lines (34 loc) · 1.47 KB
/
Makefile
File metadata and controls
executable file
·49 lines (34 loc) · 1.47 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
#* Variables
SHELL := /usr/bin/env bash
PYTHON := python3.11
PYTHONPATH := `pwd`
#* Docker variables
IMAGE := tracking_ui
VERSION := latest
.PHONY: $(shell sed -n -e '/^$$/ { n ; /^[^ .\#][^ ]*:/ { s/:.*$$// ; p ; } ; }' $(MAKEFILE_LIST))
.DEFAULT_GOAL := help
help: ## list make commands
@echo ${MAKEFILE_LIST}
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
init: ## init project
bash scripts/build.sh
up: ## start app (no daemon mode)
docker-compose up --build --remove-orphans
open: ## open http://localhost:8000/
open http://localhost:8000/
open-api: ## open http://localhost:8000/api/docs
open http://localhost:8000/api/docs
docker-kill: ## kill all docker containers
for id in $$(docker ps --format "{{.ID}}"); do docker kill $$id; done
#* Cleaning
pycache-remove: ## cleanup subcommand - pycache-remove
find . | grep -E "(__pycache__|\.pyc|\.pyo$$)" | xargs rm -rf
dsstore-remove: ## cleanup subcommand - dsstore-remove
find . | grep -E ".DS_Store" | xargs rm -rf
mypycache-remove: ## cleanup subcommand - mypycache-remove
find . | grep -E ".mypy_cache" | xargs rm -rf
ipynbcheckpoints-remove: ## cleanup subcommand - ipynbcheckpoints-remove
find . | grep -E ".ipynb_checkpoints" | xargs rm -rf
pytestcache-remove: ## cleanup subcommand - pytestcache-remove
find . | grep -E ".pytest_cache" | xargs rm -rf
cleanup: pycache-remove dsstore-remove mypycache-remove ipynbcheckpoints-remove pytestcache-remove