add helper scripts

This commit is contained in:
2025-02-04 21:01:10 +00:00
parent 1805d0531b
commit f4999f4d19
2 changed files with 24 additions and 0 deletions

11
build.sh Executable file
View File

@@ -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

13
run_local.sh Executable file
View File

@@ -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