diff --git a/Makefile b/Makefile index 9d724ab064..663879d440 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,6 @@ +ISTIO_SERVE_DOMAIN ?= localhost +export ISTIO_SERVE_DOMAIN + img := gcr.io/istio-testing/website-builder:2019-02-13 docker := docker run -e INTERNAL_ONLY=true -t -i --sig-proxy=true --rm -v $(shell pwd):/site -w /site $(img) @@ -19,7 +22,7 @@ lint: $(docker) scripts/lint_site.sh serve: - docker run -t -i --sig-proxy=true --rm -v $(shell pwd):/site -w /site -p 1313:1313 $(img) hugo serve --baseURL "http://localhost:1313/" --bind 0.0.0.0 --disableFastRender + docker run -t -i --sig-proxy=true --rm -v $(shell pwd):/site -w /site -p 1313:1313 $(img) hugo serve --baseURL "http://${ISTIO_SERVE_DOMAIN}:1313/" --bind 0.0.0.0 --disableFastRender netlify: scripts/gen_site.sh "$(baseurl)" diff --git a/README.md b/README.md index 9509fd5504..f462152805 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,16 @@ $ make serve This will build the site and start a web server hosting the site. You can then connect to the web server at `http://localhost:1313`. +To make and serve the site from a remote server, override `ISTIO_SERVE_DOMAIN` as follows with the IP address +or DNS Domain of the server as follows: + +```bash +$ export ISTIO_SERVE_DOMAIN=192.168.7.105 +$ make serve +``` +This will build the site and start a web server hosting the site. You can then connect to the web server +at `http://192.168.7.105:1313`. + All normal content for the site is located in the `content` directory, as well as in sibling translated directories such as content_zh.