Skip to content

Commit 64e9ea7

Browse files
author
Tim Bannister
committed
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.
1 parent f33cb76 commit 64e9ea7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ docker-build:
4545
$(DOCKER_RUN) $(DOCKER_IMAGE) hugo
4646

4747
docker-serve:
48-
$(DOCKER_RUN) -p 1313:1313 $(DOCKER_IMAGE) hugo server --buildFuture --bind 0.0.0.0
48+
$(DOCKER_RUN) --mount type=tmpfs,destination=/src/resources,tmpfs-mode=0755 -p 1313:1313 $(DOCKER_IMAGE) hugo server --buildFuture --bind 0.0.0.0
4949

5050
test-examples:
5151
scripts/test_examples.sh install

0 commit comments

Comments
 (0)