diff --git a/README.md b/README.md index 5a115d1..d6f4628 100644 --- a/README.md +++ b/README.md @@ -15,3 +15,11 @@ npm install ``` Then run the site using `npm run serve`. To have the site run locally with a functioning local search, run `npm run serve:with-pagefind`. + +### To run in docker + +As memtioned above, fork and clone this repository, run `git submodule`, then run following: + +```bash +./run-hugo-in-docker.sh +``` diff --git a/run-hugo-in-docker.sh b/run-hugo-in-docker.sh new file mode 100755 index 0000000..d9f3b5f --- /dev/null +++ b/run-hugo-in-docker.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +TODO_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" + +docker run -it --rm --name hugo-todo-glossary \ + -v ${TODO_DIR}:/src/ \ + -v ${TODO_DIR}/run-hugo.sh:/run-hugo.sh \ + -w /src/ \ + -p 1313:1313 \ + eclipsefdn/hugo-node:h0.120.4-n18.19.1 \ + /run-hugo.sh diff --git a/run-hugo.sh b/run-hugo.sh new file mode 100755 index 0000000..31fc22d --- /dev/null +++ b/run-hugo.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +mkdir /.npm +chown 1000:1000 /.npm +npm install + +apt install gosu +gosu 1000 hugo serve --minify -DFE -w --bind 0.0.0.0