From 26b463846b36a6ae13e2794fca10428d62508d62 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"