diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md index a9f248b4..1ea53d1e 100644 --- a/DEVELOPMENT.md +++ b/DEVELOPMENT.md @@ -71,3 +71,16 @@ then you can run the unit tests: ```console make test-unit ``` + +# Run the docs + +To get started with developing the docs we provide a docker image which you can use from within the `/docs` directory. It should work on all platforms. To get it up and running: + +``` +docker run -it --rm \ + --name hugo-server \ + -p 1313:1313 \ + -v $(PWD):/src:cached \ + gomods/hugo + +``` diff --git a/Makefile b/Makefile index 8662a670..d698ba01 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ run: build .PHONY: docs docs: - cd docs && hugo + docker build -t gomods/hugo -f docs/Dockerfile . .PHONY: setup-dev-env setup-dev-env: @@ -54,7 +54,7 @@ alldeps: docker-compose -p athensdev up -d minio docker-compose -p athensdev up -d jaeger echo "sleeping for a bit to wait for the DB to come up" - sleep 5 + sleep 5 .PHONY: dev dev: diff --git a/docs/Dockerfile b/docs/Dockerfile new file mode 100644 index 00000000..012c731f --- /dev/null +++ b/docs/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine:3.8 + +ENV HUGO_VERSION=0.50 +ENV HUGO_BINARY=hugo_${HUGO_VERSION}_Linux-64bit.tar.gz + +ADD https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY} /tmp + +RUN tar -xf /tmp/${HUGO_BINARY} -C /tmp \ + && mv /tmp/hugo /usr/local/bin/hugo \ + && rm -rf /tmp/hugo_${HUGO_VERSION}_linux_amd64 \ + && rm -rf /tmp/${HUGO_BINARY} \ + && rm -rf /tmp/LICENSE.md \ + && rm -rf /tmp/README.md \ + && apk upgrade --update \ + && apk add --no-cache git asciidoctor libc6-compat libstdc++ ca-certificates + +WORKDIR /src + +CMD ["hugo", "server", "-s", "/src", "-b", "http://localhost:1313", "--bind", "0.0.0.0"] + +EXPOSE 1313