Skip to content

Commit

Permalink
Update deploy script
Browse files Browse the repository at this point in the history
  • Loading branch information
bobcoin98 committed Nov 20, 2023
1 parent befe8f9 commit 4d6bbd9
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/devnet-teleport.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ jobs:
run: |
tsh -i ${{ steps.auth.outputs.identity-file }} ssh ${{ secrets.TELEPORT_USERNAME_DEVNET }}@${{ secrets.TELEPORT_HOSTNAME_DEVNET }} "rm -rf ${{ secrets.DEVNET_DEPLOY_PATH }} && mkdir ${{ secrets.DEVNET_DEPLOY_PATH }}"
rsync -r -e 'tsh ssh -i ${{ steps.auth.outputs.identity-file }}' ./build ${{ secrets.TELEPORT_USERNAME_DEVNET }}@${{ secrets.TELEPORT_HOSTNAME_DEVNET }}:${{ secrets.DEVNET_DEPLOY_PATH }}
tsh -i ${{ steps.auth.outputs.identity-file }} ssh ${{ secrets.TELEPORT_USERNAME_DEVNET }}@${{ secrets.TELEPORT_HOSTNAME_DEVNET }} "cd ${{ secrets.DEVNET_DEPLOY_PATH }} && bash deploy-dev.sh"
- name: Slack Notification
uses: rtCamp/action-slack-notify@v2
Expand Down
6 changes: 6 additions & 0 deletions deploy-dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

cp ../config/tomoissuer.json ./config/local.json

pm2 list || npm i -g pm2
pm2 startOrReload pm2.config.js
26 changes: 26 additions & 0 deletions pm2.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
apps: [
{
name: 'vic-issuer-app',
script: 'index.js',
// Options reference: https://pm2.keymetrics.io/docs/usage/application-declaration/
exec_mode: 'cluster_mode',
instances: 2,
'listen-timeout': 10000,
restart_delay: 10000,
autorestart: true,
watch: false,
time: true
},
{
name: 'vic-issuer-crawler',
script: 'crawl.js',
exec_mode: 'fork',
instances: 1,
restart_delay: 10000,
autorestart: true,
watch: false,
time: true
}
]
}

0 comments on commit 4d6bbd9

Please sign in to comment.