Update scripts
This commit is contained in:
parent
a3e062a1ff
commit
a001e63857
3 changed files with 9 additions and 6 deletions
|
@ -5,6 +5,7 @@
|
||||||
"main": "./dist/vylbot",
|
"main": "./dist/vylbot",
|
||||||
"typings": "./dist",
|
"typings": "./dist",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"clean": "rm -rf node_modules/ dist/",
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"start": "node ./dist/vylbot",
|
"start": "node ./dist/vylbot",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
export PATH="$HOME/.yarn/bin:$PATH"
|
export PATH="$HOME/.yarn/bin:$PATH"
|
||||||
export PATH="$HOME/.nvm/versions/node/v16.17.0/bin/:$PATH"
|
export PATH="$HOME/.nodeuse/bin:$PATH"
|
||||||
|
|
||||||
export BOT_TOKEN=$(cat $HOME/scripts/vylbot/prod_key.txt)
|
export BOT_TOKEN=$(cat $HOME/scripts/vylbot/prod_key.txt)
|
||||||
|
|
||||||
|
@ -9,14 +9,15 @@ cd ~/apps/vylbot/vylbot_prod \
|
||||||
&& git checkout main \
|
&& git checkout main \
|
||||||
&& git fetch \
|
&& git fetch \
|
||||||
&& git pull \
|
&& git pull \
|
||||||
&& docker-compose --file docker-compose.prod.yml down \
|
&& docker compose --file docker-compose.prod.yml down \
|
||||||
&& (pm2 stop vylbot_prod || true) \
|
&& (pm2 stop vylbot_prod || true) \
|
||||||
&& (pm2 delete vylbot_prod || true) \
|
&& (pm2 delete vylbot_prod || true) \
|
||||||
&& cp .prod.env .env \
|
&& cp .prod.env .env \
|
||||||
&& cp ormconfig.prod.json ormconfig.json \
|
&& cp ormconfig.prod.json ormconfig.json \
|
||||||
|
&& yarn clean \
|
||||||
&& yarn install --frozen-lockfile \
|
&& yarn install --frozen-lockfile \
|
||||||
&& yarn build \
|
&& yarn build \
|
||||||
&& docker-compose --file docker-compose.prod.yml up -d \
|
&& docker compose --file docker-compose.prod.yml up -d \
|
||||||
&& echo "Sleeping for 10 seconds to let database load..." \
|
&& echo "Sleeping for 10 seconds to let database load..." \
|
||||||
&& sleep 10 \
|
&& sleep 10 \
|
||||||
&& yarn run db:up \
|
&& yarn run db:up \
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
||||||
export PATH="$HOME/.yarn/bin:$PATH"
|
export PATH="$HOME/.yarn/bin:$PATH"
|
||||||
export PATH="$HOME/.nvm/versions/node/v16.17.0/bin/:$PATH"
|
export PATH="$HOME/.nodeuse/bin:$PATH"
|
||||||
|
|
||||||
export BOT_TOKEN=$(cat $HOME/scripts/vylbot/stage_key.txt)
|
export BOT_TOKEN=$(cat $HOME/scripts/vylbot/stage_key.txt)
|
||||||
|
|
||||||
|
@ -9,14 +9,15 @@ cd ~/apps/vylbot/vylbot_stage \
|
||||||
&& git checkout develop \
|
&& git checkout develop \
|
||||||
&& git fetch \
|
&& git fetch \
|
||||||
&& git pull \
|
&& git pull \
|
||||||
&& docker-compose --file docker-compose.stage.yml down \
|
&& docker compose --file docker-compose.stage.yml down \
|
||||||
&& (pm2 stop vylbot_stage || true) \
|
&& (pm2 stop vylbot_stage || true) \
|
||||||
&& (pm2 delete vylbot_stage || true) \
|
&& (pm2 delete vylbot_stage || true) \
|
||||||
&& cp .stage.env .env \
|
&& cp .stage.env .env \
|
||||||
&& cp ormconfig.stage.json ormconfig.json \
|
&& cp ormconfig.stage.json ormconfig.json \
|
||||||
|
&& yarn clean \
|
||||||
&& yarn install --frozen-lockfile \
|
&& yarn install --frozen-lockfile \
|
||||||
&& yarn build \
|
&& yarn build \
|
||||||
&& docker-compose --file docker-compose.stage.yml up -d \
|
&& docker compose --file docker-compose.stage.yml up -d \
|
||||||
&& echo "Sleeping for 10 seconds to let database load..." \
|
&& echo "Sleeping for 10 seconds to let database load..." \
|
||||||
&& sleep 10 \
|
&& sleep 10 \
|
||||||
&& yarn run db:up \
|
&& yarn run db:up \
|
||||||
|
|
Loading…
Reference in a new issue