Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,6 @@ ONBUILD RUN hugo -d /usr/share/nginx/html/

# By default, serve site
ENV HUGO_BASE_URL http://localhost:1313
CMD hugo server -b ${HUGO_BASE_URL} --bind=0.0.0.0
# By default, append port
ENV HUGO_APPEND_PORT true
CMD hugo server -b ${HUGO_BASE_URL} --appendPort=${HUGO_APPEND_PORT} --bind=0.0.0.0
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ This will automatically start `hugo server`, and your blog is now available on h
If you are using `boot2docker`, you need to adjust the base URL:

docker run -p 1313:1313 -e HUGO_BASE_URL=http://YOUR_DOCKER_IP:1313 monachus/hugo

If you want to change use a proxy (like `letsencrypt-nginx-proxy-companion`), you need to disable the port

docker run [...lets-encrypt-arg...] -e HUGO_BASE_URL=https://my.domain.name -e HUGO_APPEND_PORT=false monachus/hugo

The image is also suitable for use as a volume image for a web server, such as [nginx](https://registry.hub.docker.com/_/nginx/)

Expand Down