This commit is contained in:
parent
99f23cfb1c
commit
dd86ecd5a4
1 changed files with 10 additions and 4 deletions
14
.drone.yml
14
.drone.yml
|
@ -15,7 +15,7 @@ steps:
|
||||||
- npm test
|
- npm test
|
||||||
- name: deploy to prod
|
- name: deploy to prod
|
||||||
image: drillster/drone-rsync
|
image: drillster/drone-rsync
|
||||||
secrets: [ ssh_key ]
|
secrets: [ ssh_key, bot_token_prod ]
|
||||||
settings:
|
settings:
|
||||||
hosts:
|
hosts:
|
||||||
- 192.168.68.120
|
- 192.168.68.120
|
||||||
|
@ -26,10 +26,13 @@ steps:
|
||||||
target: ~/apps/card-drop/card-drop_prod
|
target: ~/apps/card-drop/card-drop_prod
|
||||||
recursive: true
|
recursive: true
|
||||||
script:
|
script:
|
||||||
- source .bashrc
|
- export PATH="$HOME/.yarn/bin:$PATH"
|
||||||
|
- export PATH="$HOME/.nodeuse/bin:$PATH"
|
||||||
|
- export BOT_TOKEN="$BOT_TOKEN_PROD"
|
||||||
- cd ~/apps/card-drop/card-drop_prod
|
- cd ~/apps/card-drop/card-drop_prod
|
||||||
- docker compose --file docker-compose.prod.yml up -d
|
- docker compose --file docker-compose.prod.yml up -d
|
||||||
- sleep 10
|
- sleep 10
|
||||||
|
- cp .prod.env .env
|
||||||
- pm2 restart card-drop_prod || pm2 start --name card-drop_prod dist/bot.js
|
- pm2 restart card-drop_prod || pm2 start --name card-drop_prod dist/bot.js
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
@ -53,7 +56,7 @@ steps:
|
||||||
- npm test
|
- npm test
|
||||||
- name: deploy to stage
|
- name: deploy to stage
|
||||||
image: drillster/drone-rsync
|
image: drillster/drone-rsync
|
||||||
secrets: [ ssh_key ]
|
secrets: [ ssh_key, bot_token_stage ]
|
||||||
settings:
|
settings:
|
||||||
hosts:
|
hosts:
|
||||||
- 192.168.68.120
|
- 192.168.68.120
|
||||||
|
@ -64,10 +67,13 @@ steps:
|
||||||
target: ~/apps/card-drop/card-drop_stage
|
target: ~/apps/card-drop/card-drop_stage
|
||||||
recursive: true
|
recursive: true
|
||||||
script:
|
script:
|
||||||
- source .bashrc
|
- export PATH="$HOME/.yarn/bin:$PATH"
|
||||||
|
- export PATH="$HOME/.nodeuse/bin:$PATH"
|
||||||
|
- export BOT_TOKEN="$BOT_TOKEN_STAGE"
|
||||||
- cd ~/apps/card-drop/card-drop_stage
|
- cd ~/apps/card-drop/card-drop_stage
|
||||||
- docker compose --file docker-compose.stage.yml up -d
|
- docker compose --file docker-compose.stage.yml up -d
|
||||||
- sleep 10
|
- sleep 10
|
||||||
|
- cp .stage.env .env
|
||||||
- pm2 restart card-drop_stage || pm2 start --name card-drop_stage dist/bot.js
|
- pm2 restart card-drop_stage || pm2 start --name card-drop_stage dist/bot.js
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
|
|
Loading…
Reference in a new issue