Add boilerplate for 'make serve'

This commit is contained in:
Lance Vick 2024-12-07 17:31:54 -08:00
parent 8e8451ec26
commit b705d2677a
Signed by: lrvick
GPG Key ID: 8E47A1EC35A1551D
3 changed files with 41 additions and 0 deletions

18
.editorconfig Normal file
View File

@ -0,0 +1,18 @@
root = true
[Containerfile]
charset = utf8
indent_style = tab
indent_size = 2
[Makefile]
indent_style = tab
indent_size = 2
[*.md]
indent_style = space
indent_size = 2
[*]
end_of_line = lf
insert_final_newline = true

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
out/

22
Makefile Normal file
View File

@ -0,0 +1,22 @@
PORT := 8080
default: build
out:
mkdir -p out
.PHONY: build
build: out/index.json
out/index.json: out Containerfile
docker \
build \
-f Containerfile \
--output type=oci,rewrite-timestamp=true,force-compression=true,name=distrust/docs,tar=true,dest=- \
. \
| tar -C out/ -mx
.PHONY: serve
serve: build
tar -C out/ -cf - . | docker load
docker run -p $(PORT):8080 distrust/docs