forked from ubccr/coldfront
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (37 loc) · 1.25 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
PRODIMAGE = coldfront:latest
PRODBUILDARGS = --ssh default
DRFIMAGE = coldfront
DRFBUILDARGS = --ssh default
DRFFILE = Dockerfile
DOCKERCOMPOSEFILE = docker-compose.yml
DOCKERCOMPOSEARGS =
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: test Makefile docs drf build clean
clean:
find . -name "*.pyc" -print0 | xargs -0 rm -f
build: drf
drf:
docker build -t $(DRFIMAGE) -f $(DRFFILE) $(DRFBUILDARGS) .
prod:
./set-version.sh
docker build -t $(PRODIMAGE) $(PRODBUILDARGS) .
up: drf
docker-compose -f $(DOCKERCOMPOSEFILE) $(DOCKERCOMPOSEARGS) up
down:
docker-compose -f $(DOCKERCOMPOSEFILE) down
up-local: drf
docker-compose -f docker-compose-local.yml $(DOCKERCOMPOSEARGS) up
down-local:
docker-compose -f docker-compose-local.yml down
run: drf
docker-compose run $(DRFIMAGE) /bin/bash
test: drf
docker run --rm -it -v `pwd`:/app $(DRFIMAGE) ./manage.py test -v 2
docs:
docker-compose run $(DRFIMAGE) make html; docker-compose down
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXAPIDOC) -e -M --force -o "$(SOURCEDIR)" fiine
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)