-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (45 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
TAG=lfe/revealjs
REVEAL_REPO=https://github.com/hakimel/reveal.js.git
REVEAL_DIR=reveal.js
PORT=1313
PRES_NAME=docker
PWD=$(shell pwd)
CONTENT_DIR=$(PWD)/content
THEME_DIR=$(PWD)/theme
OUTPUT_DIR=$(PWD)/output
PDF_DIR=$(PWD)/pdf
PDF_GEN_TAG=astefanutti/decktape
default: run
img:
@docker build -t $(TAG) .
init-demo:
@git submodule add -b demo `git remote get-url --push origin` demo
run: img
@docker run -it -p $(PORT):$(PORT) \
-v $(CONTENT_DIR):/src/content \
-v $(THEME_DIR):/src/assets \
-v $(OUTPUT_DIR):/src/public \
$(TAG) \
server
build: img
@docker run \
-v $(CONTENT_DIR):/src/content \
-v $(OUTPUT_DIR):/src/public \
$(TAG)
pdf: build
@docker run --rm -t -v $(PDF_DIR):/slides $(PDF_GEN_TAG) \
$(OUTPUT_DIR)/index.html $(PDF_DIR)/presentation.pdf
help: build
@docker run -it -p $(PORT):$(PORT) -v $(CONTENT_DIR):/src/content $(TAG) \
help
new: build
@docker run -it -p $(PORT):$(PORT) -v $(CONTENT_DIR):/src/content $(TAG) \
new site $(PRES_NAME)
shell: build
@docker run -it \
-v $(CONTENT_DIR):/src/content \
-v $(THEME_DIR):/src/assets \
--entrypoint=bash $(TAG)
clean-all:
@-docker volume rm $$(docker volume ls -qf dangling=true)
@-docker system prune