Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.

Commit 2c32f0c

Browse files
committed
Automatisation
1 parent a1fd1e7 commit 2c32f0c

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

Makefile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
IMAGE=codingdojo
2+
3+
build:
4+
docker build --pull -t ${IMAGE} .
5+
6+
hugo:
7+
hugo server --buildDrafts --buildFuture --watch --bind 0.0.0.0
8+
9+
docker-dev: build
10+
@docker rm -f codingdojo || true
11+
docker run --name codingdojo -p 1313:1313 --rm -it -v $(shell pwd):/site --entrypoint=/bin/bash ${IMAGE}
12+
13+

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,16 @@ Note that the current version of Hugo (0.34 as of this writing) seems to have pr
2525
the content is laid out in this repo. Older versions (like 0.26 in the Docker image) work fine.
2626

2727
# serve local files with live-reload
28-
hugo server -w
28+
make hugo
2929

3030
Open your browser on `http://localhost:1313` and start your favorite editor!
3131

3232
### Using Hugo from the `Dockerfile`
3333

3434
Assuming you have [Docker](https://www.docker.com/community-edition) installed, you build an image and run it:
3535

36-
docker build -t codingdojo .
37-
docker run -p 1313:1313 --rm -it -v $(pwd):/site codingdojo hugo server -w --bind 0.0.0.0
38-
39-
You only need to build the image once.
36+
make docker-dev
37+
make hugo
4038

4139
Open your browser on `http://localhost:1313` and start your favorite editor!
4240

0 commit comments

Comments
 (0)