-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
63 lines (46 loc) · 1.34 KB
/
Makefile
File metadata and controls
63 lines (46 loc) · 1.34 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
54
55
56
57
58
59
60
61
62
BOOTSTRAP_VER = 4.3.1
REGISTRY_URL=hub.lnxsystems.com
PROJECT=library
IMAGE_NAME=django-bootstrap-template
TAG=0.1.1
.PHONY: web
web: bootstrap venv migrate
.PHONY: setup
setup: venv web/requirements.txt bootstrap
.PHONY: clean
clean: clean_bootstrap
.PHONY: clean_bootstrap
clean_bootstrap:
rm -rf web/bootstrap/static/bootstrap
rm -rf "bootstrap-${BOOTSTRAP_VER}"
.PHONY: bootstrap
bootstrap: web/bootstrap/static/bootstrap
web/bootstrap/static/bootstrap:
sh ./scripts/manage_bootstrap.sh
touch web/bootstrap/static/bootstrap
.PHONY: update_gitignore
update_gitignore:
.PHONY:
venv:
virtualenv venv
source venv/bin/activate && pip install -r web/requirements.txt
venv/bin/python web/manage.py migrate
sh scripts/create_temp_admin.sh
.PHONY:
run:
DEBUG=True venv/bin/python web/manage.py runserver 0.0.0.0:8000
.PHONY:
migrate:
venv/bin/python web/manage.py migrate
.PHONY:
makemigrations:
venv/bin/python web/manage.py migrations
docker: web
docker build -t ${REGISTRY_URL}/${PROJECT}/${IMAGE_NAME}:${TAG} .
pull:
docker pull ${REGISTRY_URL}/${PROJECT}/${IMAGE_NAME}:latest
tag:
docker tag ${REGISTRY_URL}/${PROJECT}/${IMAGE_NAME}:${TAG} ${REGISTRY_URL}/${PROJECT}/${IMAGE_NAME}:latest
push: docker tag
docker push ${REGISTRY_URL}/${PROJECT}/${IMAGE_NAME}:latest
docker push ${REGISTRY_URL}/${PROJECT}/${IMAGE_NAME}:${TAG}