-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
68 lines (47 loc) · 1.4 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
export NAMESPACE=zenslackchat
# default set up to run with docker compose managed services:
export DATABASE_URL?=postgresql://postgres@localhost:5432/postgres
export REDIS_URL?=redis://localhost/
export DEBUG_ENABLED?=1
export DISABLE_ECS_LOG_FORMAT?=1
.DEFAULT_GOAL := all
.PHONY: all collect run run_beat run_worker migrate remove release reinstall test up ps down
all:
echo "Please choose a make target to run."
pip-compile:
python -m pip install pip-tools
requirements.txt: pip-compile
pip-compile requirements.in
install: pip-compile requirements.txt
pip install --upgrade pip
pip install -r requirements.txt
test_install:
pip install -r requirements-test.txt
clean:
rm -rf dist/ build/
find . -iname '*.pyc' -exec rm {} \; -print
collect:
python manage.py collectstatic --noinput
runserver: collect
python manage.py runserver
run: runserver
runbeat:
celery -A webapp beat -l DEBUG
runworker:
celery -A webapp worker -l DEBUG
migrate:
python manage.py migrate
superuser:
python manage.py createsuperuser
up:
docker-compose --project-name ${NAMESPACE} up --remove-orphans
ps:
docker-compose --project-name ${NAMESPACE} ps
down:
docker-compose --project-name ${NAMESPACE} logs -t
docker-compose --project-name ${NAMESPACE} down --remove-orphans
lint:
flake8 --ignore=E501 webapp
flake8 --ignore=E501 zenslackchat
test: lint
pytest -s --ds=webapp.settings --cov=zenslackchat --cov=webapp