-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
53 changed files
with
1,322 additions
and
1,090 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -69,8 +69,8 @@ jobs: | |
sleep 1 | ||
done | ||
- name: Restore DB backup | ||
run: PGPASSWORD=postgres psql -h localhost -p 5443 -U postgres -d givethio < /tmp/backups/givethio-staging/db_backup.sql | ||
# - name: Restore DB backup | ||
# run: PGPASSWORD=postgres psql -h localhost -p 5443 -U postgres -d givethio < /tmp/backups/givethio-staging/db_backup.sql | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
|
@@ -124,12 +124,17 @@ jobs: | |
deploy: | ||
needs: publish | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'push' | ||
steps: | ||
- name: Staging deploy | ||
uses: garygrossgarten/github-action[email protected] | ||
- name: SSH and Redeploy | ||
uses: appleboy/ssh-action@v1.0.0 | ||
with: | ||
command: cd impact-graph && git checkout staging && git pull && docker-compose -f docker-compose-staging.yml pull && docker-compose -f docker-compose-staging.yml down && docker-compose -f docker-compose-staging.yml up -d && docker image prune -a --force; | ||
host: ${{ secrets.STAGING_HOST }} | ||
username: ${{ secrets.STAGING_USERNAME }} | ||
privateKey: ${{ secrets.STAGING_PRIVATE_KEY}} | ||
host: ${{ secrets.STAGING_HOST_ALL }} | ||
username: ${{ secrets.STAGING_USERNAME_ALL }} | ||
key: ${{ secrets.STAGING_PRIVATE_KEY_ALL }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script: | | ||
cd giveth-all | ||
docker-compose stop impact-graph | ||
docker-compose pull impact-graph | ||
docker-compose up -d impact-graph | ||
docker image prune -a --force |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { MigrationInterface, QueryRunner } from 'typeorm'; | ||
|
||
export class MigrateToBalanceAggregator1692623384774 | ||
implements MigrationInterface | ||
{ | ||
async up(queryRunner: QueryRunner): Promise<void> { | ||
// Drop instant power balance table and recreate it with new schema | ||
await queryRunner.query(` | ||
DELETE FROM public.instant_power_balance; | ||
ALTER TABLE IF EXISTS public.instant_power_balance | ||
DROP COLUMN "chainUpdatedAt", | ||
ADD COLUMN "balanceAggregatorUpdatedAt" timestamp without time zone NOT NULL; | ||
`); | ||
|
||
// Drop InstantPowerFetchState table and create new one | ||
await queryRunner.query(` | ||
DELETE from public.instant_power_fetch_state; | ||
ALTER TABLE IF EXISTS public.instant_power_fetch_state | ||
DROP COLUMN "latestBlockNumber", | ||
DROP COLUMN "latestBlockTimestamp", | ||
ADD COLUMN "maxFetchedUpdateAtTimestampMS" bigint NOT NULL; | ||
`); | ||
} | ||
|
||
async down(queryRunner: QueryRunner): Promise<void> {} | ||
} |
Oops, something went wrong.