From f4999f4d1918e73b712128462f657d908a34e96a Mon Sep 17 00:00:00 2001 From: Jake Charman Date: Tue, 4 Feb 2025 21:01:10 +0000 Subject: [PATCH] add helper scripts --- build.sh | 11 +++++++++++ run_local.sh | 13 +++++++++++++ 2 files changed, 24 insertions(+) create mode 100755 build.sh create mode 100755 run_local.sh diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..f07e8d7 --- /dev/null +++ b/build.sh @@ -0,0 +1,11 @@ +#!/bin/bash --noprofile + +set -x -o pipefail + +tag=$1 +build=0 + +docker build -t ${tag}:latest . +if [[ $build -gt 0 ]]; then + docker build -t ${tag}:${build} . +fi diff --git a/run_local.sh b/run_local.sh new file mode 100755 index 0000000..1c0cb72 --- /dev/null +++ b/run_local.sh @@ -0,0 +1,13 @@ +#!/bin/bash --noprofile + +set -x -o pipefail + +./build.sh "jc-ng-localtest" + +content_dir="" +if [[ -d "../jc-content" ]]; then + content_dir="-v $(realpath ../jc-content):/var/www/jc/projects" +fi + +docker run -v $(pwd)/src/:/var/www/jc $content_dir jc-ng-localtest +