From 4797178f0843be3b99ad49d907f8f8821defe74d Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Sun, 4 Sep 2022 17:03:46 -0600 Subject: [PATCH] Add run script --- .gitignore | 1 + run.sh | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100755 run.sh diff --git a/.gitignore b/.gitignore index 9b4a572..33bc3dd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.hugo_build.lock *~ public/ diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..7688fa6 --- /dev/null +++ b/run.sh @@ -0,0 +1,17 @@ +#! /bin/sh + +case "$(hostname)" in + sweetums) + baseURL=http://sweetums.lan:1313/ + ;; + *) + baseURL=http://$(hostname --fqdn):1313/ + ;; +esac + +docker run \ + --rm -i \ + -v $(realpath $(dirname $0)):/src \ + -u $(id -u):$(id -g) \ + klakegg/hugo:ext server \ + --baseURL "$baseURL"