You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
consul/website/Makefile

55 lines
1.5 KiB

5 years ago
# Default: run this if working on the website locally to run in watch mode.
website:
@echo "==> Downloading latest Docker image..."
@docker pull hashicorp/consul-website
@echo "==> Starting website in Docker..."
@docker run \
--interactive \
--rm \
--tty \
--workdir "/website" \
--volume "$(shell pwd):/website" \
--volume "/website/node_modules" \
--publish "3000:3000" \
hashicorp/consul-website \
npm start
5 years ago
# This command will generate a static version of the website to the "out" folder.
build:
5 years ago
@echo "==> Downloading latest Docker image..."
@docker pull hashicorp/consul-website
@echo "==> Starting build in Docker..."
@docker run \
8 years ago
--interactive \
--rm \
--tty \
5 years ago
--workdir "/website" \
--volume "$(shell pwd):/website" \
5 years ago
--volume "/website/node_modules" \
hashicorp/consul-website \
npm run static
5 years ago
# If you are changing node dependencies locally, run this to generate a new
# local Docker image with the dependency changes included.
build-image:
@echo "==> Building Docker image..."
@docker build --tag hashicorp-consul-website-local .
5 years ago
# Use this if you have run `build-image` to use the locally built image
# rather than our CI-generated image to test dependency changes.
website-local:
@echo "==> Starting website in Docker..."
@docker run \
8 years ago
--interactive \
--rm \
--tty \
5 years ago
--workdir "/website" \
--volume "$(shell pwd):/website" \
5 years ago
--volume "/website/node_modules" \
--publish "3000:3000" \
hashicorp-consul-website-local \
npm start
5 years ago
.DEFAULT_GOAL := website
.PHONY: build build-image website website-local