-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
43 lines (31 loc) · 1.1 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
# Project Targets
build:
make build-docker
make migrate-python
make manage-createsuperuser
docker-build-prod:
docker-compose -f docker/dev/python/docker-compose.prod.yml up -d --build
dev-build:
docker-compose -f docker/dev/docker-compose.dev.yml build
dev-run:
docker-compose -f docker/dev/docker-compose.dev.yml up
dev-stop:
docker-compose -f docker/dev/docker-compose.dev.yml down
stop:
docker kill $(docker ps -q)
run:
docker-compose up
manage-python:
docker-compose run --rm web python manage.py $(command)
makemigrations-python: command=makemigrations
makemigrations-python: manage-python
mm: makemigrations-python
migrate-python: command=migrate
migrate-python: manage-python
manage-createsuperuser: command=shell -c "from usermodel.models import User; User.objects.create_superuser(first_name='Admin', last_name='User', email='[email protected]', password='adminpass') if User.objects.filter(email='[email protected]').first() is None else None;"
manage-createsuperuser: manage-python
csu: manage-createsuperuse
lint:
docker-compose run --rm web flake8
bash:
docker-compose run --rm web sh