From 64e9ea7292f9243879ad89eacb5fe71de8c707e8 Mon Sep 17 00:00:00 2001 From: Tim Bannister Date: Thu, 21 May 2020 20:49:36 +0100 Subject: [PATCH] Serve rendered content from tmpfs for local dev You can run: make docker-serve to run Hugo in a container, building the site and then serving it. Rather than write the rendered content into the repository for this, set up a tmpfs and write the content there, then serve it. This change is also compatible with podman. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 75d37f767df..9f38a5a26d8 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,7 @@ docker-build: $(DOCKER_RUN) $(DOCKER_IMAGE) hugo docker-serve: - $(DOCKER_RUN) -p 1313:1313 $(DOCKER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 + $(DOCKER_RUN) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0755 -p 1313:1313 $(DOCKER_IMAGE) hugo server --buildFuture --bind 0.0.0.0 test-examples: scripts/test_examples.sh install