-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
53 lines (50 loc) · 1.53 KB
/
Copy pathMakefile
File metadata and controls
53 lines (50 loc) · 1.53 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
50
51
52
53
## DEVELOPMENT
run_dev:
source .env.dev && python manage.py runserver
makemigrations_dev:
source .env.dev && python manage.py makemigrations
migrate_dev:
source .env.dev && python manage.py migrate
shell_dev:
source .env.dev && python manage.py shell
generate_er:
source .env.dev && python manage.py graph_models -a -o myapp_models.png
populate:
source .env.dev && export $(grep -v '^#' .env.dev | xargs) && python manage.py shell
from class_attendance.loader import populate
populate()
## PRODUCTION
check_deploy_prod:
bash -c 'source .env && python manage.py check --deploy'
makemigrations_prod:
bash -c 'source .env && python manage.py makemigrations'
migrate_prod:
bash -c 'source .env && python manage.py migrate'
collectstatic_prod:
bash -c 'source .env && python manage.py collectstatic'
createsuperuser_prod:
bash -c 'source .env && python manage.py createsuperuser'
collectstatic:
python manage.py collectstatic
setup_env:
exit
pipenv shell
pipenv install
deploy_prod:
bash -c 'source .env && python manage.py makemigrations'
bash -c 'source .env && python manage.py migrate'
bash -c 'source .env && python manage.py collectstatic'
bash -c 'source .env && python manage.py check --deploy'
sudo systemctl restart gunicorn.service
populate_prod:
bash -c 'source .env && python manage.py shell'
from class_attendance.loader import populate
from class_attendance.loader import archive
populate()
logs_prod:
sudo journalctl -u gunicorn -f
## Issues
fix_jwt:
pipenv uninstall JWT
pipenv uninstall PyJWT
pipenv pip install PyJWT