From b705d2677acc21b21770b1dcac7236bd9e7baf33 Mon Sep 17 00:00:00 2001 From: "Lance R. Vick" Date: Sat, 7 Dec 2024 17:31:54 -0800 Subject: [PATCH] Add boilerplate for 'make serve' --- .editorconfig | 18 ++++++++++++++++++ .gitignore | 1 + Makefile | 22 ++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 .editorconfig create mode 100644 .gitignore create mode 100644 Makefile diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..d73feda --- /dev/null +++ b/.editorconfig @@ -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 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..89f9ac0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +out/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..99fe681 --- /dev/null +++ b/Makefile @@ -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 + +