-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
54 lines (39 loc) · 1.04 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
MANAGE = poetry run python manage.py
seed:
DJANGO_SUPERUSER_USERNAME=john \
DJANGO_SUPERUSER_PASSWORD=test \
DJANGO_SUPERUSER_EMAIL="[email protected]" \
$(MANAGE) createsuperuser --noinput || true
$(MANAGE) shell < seed.py
cleardb:
docker-compose stop pgdb
docker-compose rm -v -f pgdb
docker-compose up -d pgdb
initdb:
$(MANAGE) migrate
resetdb: cleardb initdb seed
shell:
DEBUG=1 $(MANAGE) shell
runserver:
OAUTHLIB_INSECURE_TRANSPORT=1 DEBUG=1 $(MANAGE) runserver
rundev:
PYTHONUNBUFFERED=true poetry run honcho start
format:
poetry run black .
poetry run isort .
poetry run autoflake --recursive --in-place --remove-all-unused-imports .
typecheck:
poetry run mypy .
test:
$(MANAGE) test
deploy:
poetry run fly deploy
# Celery
runworker:
OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES DEBUG=1 poetry run celery -A config worker -l DEBUG
runbeat:
DEBUG=1 poetry run celery -A config beat -l INFO
runtasks:
DEBUG=1 poetry run celery -A config call mainapp.tasks.collect_all_latest_task
notebook:
DEBUG=1 $(MANAGE) shell_plus --notebook