Schemas and utils for IPLD ETH Postgres database
Go to file
Ashwin Phatak b64ad6e3f7
Merge pull request #78 from deep-stack/pm-docker-job
Merge changes for docker process to build and push a docker image
2022-05-17 11:19:52 +05:30
.github/workflows Merge changes for docker process to build and push a docker image 2022-05-17 10:27:00 +05:30
db Fix migrations naming after merge 2022-05-10 19:34:01 +05:30
scripts Fix migrations naming after merge 2022-05-10 19:34:01 +05:30
.gitignore database uml 2021-08-29 14:00:39 -05:00
docker-compose.test.yml Update Dockerfile to run migrations 2022-05-10 16:22:35 +05:30
docker-compose.yml Compare Up and Down Migration. 2021-10-13 13:09:58 +05:30
Dockerfile Update Dockerfile to run migrations 2022-05-10 16:22:35 +05:30
LICENSE Initial commit 2021-05-13 17:14:05 -05:00
Makefile Remove GO111MODULE flag when installing goose in makefile 2022-03-21 17:07:46 +05:30
README.md Fix migrations naming after merge 2022-05-10 19:34:01 +05:30
schema.sql Fix migrations naming after merge 2022-05-10 19:34:01 +05:30
vulcanize_db.png updated uml 2021-12-27 11:41:30 -06:00
vulcanize_db.uml updated uml 2021-12-27 11:41:30 -06:00

ipld-eth-db

Schemas and utils for IPLD ETH Postgres database

Database UML

Run

  • Remove any existing containers / volumes:

    docker-compose down -v --remove-orphans
    
  • Spin up an access node and three data nodes using docker-compose.test.yml:

    docker-compose -f docker-compose.test.yml up
    

    Following final output should be seen on all the nodes:

    LOG:  TimescaleDB background worker launcher connected to shared catalogs
    
  • Edit startup_script.sh to change the number of migrations to be run:

    ./goose -dir migrations/vulcanizedb postgres "$VDB_PG_CONNECT" up-to 24
    
  • In another ipld-eth-db terminal window, build an image migrations-test using Dockerfile:

    docker build -t migrations-test -f ./db/Dockerfile .
    
  • After the access and data nodes have spun up, start a container using migrations-test image to run the db migrations:

    # Here, we are running the container using host network.
    # So connect to access node on 127.0.0.1:8066
    docker run --rm --network host -e DATABASE_USER=postgres -e DATABASE_PASSWORD=password -e DATABASE_HOSTNAME=127.0.0.1 -e DATABASE_PORT=8066 -e DATABASE_NAME=vulcanize_testing_v4 migrations-test