Undo commit
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Ethan Lane 2023-12-29 20:40:06 +00:00
parent c5d2edf011
commit 526b42bb4a

View file

@ -14,14 +14,25 @@ steps:
commands: commands:
- npm test - npm test
- name: deploy to prod - name: deploy to prod
image: alpine image: drillster/drone-rsync
secrets: [ ssh_key ] secrets: [ ssh_key ]
commands: settings:
- apk add rsync openssh-client hosts:
- eval `ssh-agent -s` - 192.168.68.120
- echo "$SSH_KEY" | tr -d '\r' | ssh-add - user: vylpes
- rsync -e "ssh -o StrictHostKeyChecking=no" -r ./* vylpes@192.168.68.120:/home/vylpes/apps/card-drop/card-drop_prod key:
- ssh vylpes@192.168.68.120 cd ~/apps/card-drop/card-drop_prod && docker compose --file docker-compose.prod.yml up -d && sleep 10 && pm2 start --name card-drop_prod dist/bot.js from_secret: ssh_key
source: .
target: ~/apps/card-drop/card-drop_prod
recursive: true
prescript:
- eval `ssh-agent -s`
- echo "$SSH_KEY" | tr -d '\r' | ssh-add -
script:
- cd ~/apps/card-drop/card-drop_prod
- docker compose --file docker-compose.prod.yml up -d
- sleep 10
- pm2 restart card-drop_prod || pm2 start --name card-drop_prod dist/bot.js
trigger: trigger:
event: event:
@ -43,14 +54,25 @@ steps:
commands: commands:
- npm test - npm test
- name: deploy to stage - name: deploy to stage
image: alpine image: drillster/drone-rsync
secrets: [ ssh_key ] secrets: [ ssh_key ]
commands: settings:
- apk add rsync openssh-client hosts:
- eval `ssh-agent -s` - 192.168.68.120
- echo "$SSH_KEY" | tr -d '\r' | ssh-add - user: vylpes
- rsync -e "ssh -o StrictHostKeyChecking=no" -r ./* vylpes@192.168.68.120:/home/vylpes/apps/card-drop/card-drop_stage key:
- ssh vylpes@192.168.68.120 cd ~/apps/card-drop/card-drop_stage && docker compose --file docker-compose.stage.yml up -d && sleep 10 && pm2 start --name card-drop_stage dist/bot.js from_secret: ssh_key
source: .
target: ~/apps/card-drop/card-drop_stage
recursive: true
prescript:
- eval `ssh-agent -s`
- echo "$SSH_KEY" | tr -d '\r' | ssh-add -
script:
- cd ~/apps/card-drop/card-drop_stage
- docker compose --file docker-compose.stage.yml up -d
- sleep 10
- pm2 restart card-drop_stage || pm2 start --name card-drop_stage dist/bot.js
trigger: trigger:
branch: branch: