From e4469ecf820d6b940fe7b04fa03eb5ef567f8568 Mon Sep 17 00:00:00 2001 From: Matt Gibson Date: Thu, 1 May 2025 09:22:43 -0700 Subject: [PATCH] Add helper script to run structurizr-lite This is useful for tweaking visual representations prior to upload --- docs/.gitignore | 1 + docs/structurizr.sh | 13 +++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 docs/.gitignore create mode 100644 docs/structurizr.sh diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000000..e82c382f09 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1 @@ +.structurizr diff --git a/docs/structurizr.sh b/docs/structurizr.sh new file mode 100644 index 0000000000..f1e0ed74e3 --- /dev/null +++ b/docs/structurizr.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +## start Structurizr Lite with the given workspace file, relative to the current working directory. Omit the file extension. +## Optional second argument of a port number to use. Default is 8085. + +PORT=${2:-8085} +# Check if the workspace file exists +if [ ! -f "$1.dsl" ]; then + echo "Workspace file $1 does not exist." + exit 1 +fi + +docker run -it --rm -p $PORT:8080 -v $(pwd):/usr/local/structurizr -e STRUCTURIZR_WORKSPACE_FILENAME=$1 structurizr/lite