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 \
|
2022-12-28 15:39:26 -05:00
|
|
|
--env TZ='America/New_York' \
|
2022-12-22 17:12:25 -05:00
|
|
|
--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
|
|
|
|
}
|
|
|
|
|
|
|
|
$@
|