-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
47 lines (35 loc) · 1.17 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
all:
@echo "usage: make <options> \nuse 'make help' to find out more."
help:
@echo "options:\n\thelp: get help on the makefile"
@echo "\t\run: run project in a docker container"
@echo "\t\local: run project localy"
@echo "\ttest: run ci/cd pipeline tasks"
@echo "\tinstall: install all required packages for the project"
@echo "\tstart_broker: start redis as the celery broker"
@echo "\tstop_broker: stop the celery broker"
@echo "\trestart_broker: restart the celery broker"
@echo "\tstart_celery: start a celery worker"
@echo "\tstart_celerybeat: start the celery beat service"
run:
docker-compose up --build
local: start_broker start_celery
python manage.py runserver
test:
test-migrations test-pylint
test-migrations:
python manage.py makemigrations --check --dry-run
test-pylint:
find . -type f -name "*.py" | grep -vE "migrations|^./venv|^./cache|^./lib|^./media" | xargs pylint
install:
pip install -r requirements.txt
start_broker:
docker run --name broker -d -p6379:6379 redis:alpine
stop_broker:
docker stop broker
restart_broker:
docker start broker
start_celery:
celery -A mini_kaggle worker -l INFO --detach
start_celerybeat:
celery -A mini_kaggle beat