29 lines
618 B
Bash
Executable File
29 lines
618 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
up () {
|
|
docker run \
|
|
--detach \
|
|
--name cavereveryhour \
|
|
--restart unless-stopped \
|
|
--workdir /home/node/app \
|
|
--env NODE_ENV=production \
|
|
--env TZ='America/New_York' \
|
|
--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
|
|
}
|
|
|
|
$@
|