From 2cb85ebaf7bb6798a770571e5388bbb2126e03fc Mon Sep 17 00:00:00 2001 From: Paul Walko Date: Thu, 22 Dec 2022 17:12:25 -0500 Subject: [PATCH] add cavereveryhour --- fogcutter/docker/.gitignore | 2 ++ fogcutter/docker/cavereveryhour.sh | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100755 fogcutter/docker/cavereveryhour.sh diff --git a/fogcutter/docker/.gitignore b/fogcutter/docker/.gitignore index e4d588e..d2357b8 100644 --- a/fogcutter/docker/.gitignore +++ b/fogcutter/docker/.gitignore @@ -1,2 +1,4 @@ +CaverEveryHour/ +cavereveryhour.env firefly.env mastodon.env diff --git a/fogcutter/docker/cavereveryhour.sh b/fogcutter/docker/cavereveryhour.sh new file mode 100755 index 0000000..f947cf3 --- /dev/null +++ b/fogcutter/docker/cavereveryhour.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +set -e + +up () { + docker run \ + --detach \ + --name cavereveryhour \ + --restart unless-stopped \ + --workdir /home/node/app \ + --env NODE_ENV=production \ + --volume $PWD/CaverEveryHour:/home/node/app:rw \ + --volume $PWD/cavereveryhour.env:/home/node/app/.env:ro \ + --volume /bigdata/tmp/EveryHourBot/CaverEveryHour:/home/node/app/media:ro \ + docker.io/node:16 /bin/bash -c "npm install && node index.js" +} + +down () { + docker stop cavereveryhour || true + docker rm cavereveryhour || true +} + +logs () { + docker logs --follow cavereveryhour +} + +$@