forked from NC3-LU/Fit4Cybersecurity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
60 lines (43 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
48
49
50
51
52
53
54
55
56
57
58
59
60
SHELL := /bin/bash
# target: all - Default target. Does nothing.
all:
@echo "Hello $(LOGNAME), nothing to do by default."
@echo "Try 'make help'"
help:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'
install:
poetry install
activate:
poetry shell
run:
python manage.py runserver
migration:
python manage.py makemigrations
migrate:
python manage.py migrate
populate:
python manage.py import_questions $(path)/questions.json
droptestdb:
dropdb fit4cybersecurity1 ; createdb fit4cybersecurity1
inittestdb: droptestdb migrate populate
@echo "Done"
superuser:
python manage.py createsuperuser
generateschema:
python manage.py generateschema --file $(schemapath)
generatepot:
python manage.py makemessages -a --keep-pot
update:
npm ci
poetry install --no-dev
python manage.py collectstatic
python manage.py compilemessages
python manage.py migrate
deploy:
docker-compose build
docker-compose up -d
down:
docker-compose down
clean:
find . -type f -name "*.py[co]" -delete
find . -type d -name "__pycache__" -delete