scripts/fogcutter/docker/cavereveryhour.sh

28 lines
584 B
Bash
Raw Normal View History

2022-12-22 17:12:25 -05:00
#!/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
}
$@