github.com/uchennaokeke444/nomad@v0.11.8/website/Makefile (about)

     1  # Default: run this if working on the website locally to run in watch mode.
     2  website:
     3  	@echo "==> Downloading latest Docker image..."
     4  	@docker pull hashicorp/nomad-website
     5  	@echo "==> Starting website in Docker..."
     6  	@docker run \
     7  		--interactive \
     8  		--rm \
     9  		--tty \
    10  		--workdir "/website" \
    11  		--volume "$(shell pwd):/website" \
    12  		--volume "/website/node_modules" \
    13  		--publish "3000:3000" \
    14  		hashicorp/nomad-website \
    15  		npm start
    16  
    17  # This command will generate a static version of the website to the "out" folder.
    18  build:
    19  	@echo "==> Downloading latest Docker image..."
    20  	@docker pull hashicorp/nomad-website
    21  	@echo "==> Starting build in Docker..."
    22  	@docker run \
    23  		--interactive \
    24  		--rm \
    25  		--tty \
    26  		--workdir "/website" \
    27  		--volume "$(shell pwd):/website" \
    28  		--volume "/website/node_modules" \
    29  		hashicorp/nomad-website \
    30  		npm run static
    31  
    32  # If you are changing node dependencies locally, run this to generate a new
    33  # local Docker image with the dependency changes included.
    34  build-image:
    35  	@echo "==> Building Docker image..."
    36  	@docker build -t hashicorp-nomad-website-local .
    37  
    38  # Use this if you have run `build-image` to use the locally built image
    39  # rather than our CI-generated image to test dependency changes.
    40  website-local:
    41  	@echo "==> Downloading latest Docker image..."
    42  	@docker pull hashicorp/nomad-website
    43  	@echo "==> Starting website in Docker..."
    44  	@docker run \
    45  		--interactive \
    46  		--rm \
    47  		--tty \
    48  		--workdir "/website" \
    49  		--volume "$(shell pwd):/website" \
    50  		--volume "/website/node_modules" \
    51  		--publish "3000:3000" \
    52  		hashicorp-nomad-website-local \
    53  		npm start
    54  
    55  .DEFAULT_GOAL := website
    56  .PHONY: build build-image website website-local