homepage/run.sh

32 lines
587 B
Bash
Raw Normal View History

2022-09-04 17:03:46 -06:00
#! /bin/sh
case "$(hostname)" in
2024-02-05 19:44:03 -07:00
oscar|sweetums)
2022-09-04 17:03:46 -06:00
baseURL=http://sweetums.lan:1313/
;;
2022-10-09 20:59:33 -06:00
penguin)
baseURL=http://penguin.linux.test:1313/
;;
2022-09-04 17:03:46 -06:00
*)
2024-02-05 18:47:15 -07:00
baseURL=http://$(hostname):1313/
2022-09-04 17:03:46 -06:00
;;
esac
2024-02-05 18:47:15 -07:00
src=$(realpath $(dirname $0))
podman run \
2022-09-04 17:03:46 -06:00
--rm -i \
2024-02-05 18:47:15 -07:00
-v $src/content:/src/content:ro \
-v $src/layouts:/src/layouts:ro \
-v $src/config:/src/config:ro \
-v $src/static:/src/static:ro \
-v $src/.git:/src/.git:ro \
2022-09-04 17:03:46 -06:00
-u $(id -u):$(id -g) \
2022-09-04 19:54:41 -06:00
-p 1313:1313 \
2022-09-04 17:03:46 -06:00
klakegg/hugo:ext server \
2022-10-10 13:19:19 -06:00
--buildFuture \
--buildDrafts \
2023-10-21 17:10:57 -06:00
--baseURL "$baseURL" \
"$@"