Skip to content

Commit

Permalink
Add shortcuts to build and run website environment.
Browse files Browse the repository at this point in the history
  • Loading branch information
javiarrobas committed Aug 31, 2023
1 parent 2a68c30 commit 7219b77
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions web/makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,33 @@
# Set $ROOT to top-level directory of the repository
ROOT ?= $(shell dirname \
$(shell dirname $(realpath $(firstword $(MAKEFILE_LIST)))))

IMG_NAME=boptestweb
IMG_HOME=/home

build-env:
docker build -f ${ROOT}/web/Dockerfile \
--platform=linux/amd64 \
--progress=plain --rm -t ${IMG_NAME} ../

build-env-no-cache:
docker build -f ${ROOT}/web/Dockerfile \
--platform=linux/amd64 \
--no-cache \
--progress=plain --rm -t ${IMG_NAME} ../

run-build-and-test:
docker run \
--name ${IMG_NAME} \
--platform=linux/amd64 \
--detach=false \
--network=host \
--rm \
-v ${ROOT}:${IMG_HOME}/boptest:rw \
-w ${IMG_HOME}/boptest/web \
-it \
${IMG_NAME} /bin/bash -c "make build_and_test"

build_and_test:
./build_docs.sh
bundle exec jekyll serve
Expand Down

0 comments on commit 7219b77

Please sign in to comment.