Update DB name.

This commit is contained in:
Arijit Das 2021-10-11 22:12:05 +05:30
parent 25b49f784b
commit 20c04a98bc
4 changed files with 9 additions and 6 deletions

View File

@ -8,7 +8,7 @@ services:
image: vulcanize/dapptools:v0.30.0-v1.10.9-statediff-0.0.27 image: vulcanize/dapptools:v0.30.0-v1.10.9-statediff-0.0.27
environment: environment:
DB_USER: vdbm DB_USER: vdbm
DB_NAME: vulcanize_public DB_NAME: vulcanize_testing
DB_HOST: ipld-eth-db DB_HOST: ipld-eth-db
DB_PORT: 5432 DB_PORT: 5432
DB_PASSWORD: password DB_PASSWORD: password
@ -21,7 +21,7 @@ services:
image: vulcanize/ipld-eth-db:v0.2.0 image: vulcanize/ipld-eth-db:v0.2.0
environment: environment:
POSTGRES_USER: "vdbm" POSTGRES_USER: "vdbm"
POSTGRES_DB: "vulcanize_public" POSTGRES_DB: "vulcanize_testing"
POSTGRES_PASSWORD: "password" POSTGRES_PASSWORD: "password"
volumes: volumes:
- vdb_db_eth_server:/var/lib/postgresql/data - vdb_db_eth_server:/var/lib/postgresql/data
@ -44,7 +44,7 @@ services:
ETH_SERVER_HTTPPATH: 0.0.0.0:8081 ETH_SERVER_HTTPPATH: 0.0.0.0:8081
VDB_COMMAND: "serve" VDB_COMMAND: "serve"
ETH_CHAIN_CONFIG: "/tmp/chain.json" ETH_CHAIN_CONFIG: "/tmp/chain.json"
DATABASE_NAME: "vulcanize_public" DATABASE_NAME: "vulcanize_testing"
DATABASE_HOSTNAME: "ipld-eth-db" DATABASE_HOSTNAME: "ipld-eth-db"
DATABASE_PORT: 5432 DATABASE_PORT: 5432
DATABASE_USER: "vdbm" DATABASE_USER: "vdbm"

View File

@ -188,7 +188,7 @@ func SetupDB() (*postgres.DB, error) {
User: "vdbm", User: "vdbm",
Password: "password", Password: "password",
Hostname: "localhost", Hostname: "localhost",
Name: "vulcanize_public", Name: "vulcanize_testing",
Port: 8077, Port: 8077,
}) })
return postgres.NewDB(uri, postgres.ConnectionConfig{}, node.Info{}) return postgres.NewDB(uri, postgres.ConnectionConfig{}, node.Info{})

View File

@ -49,7 +49,7 @@ func SetupDB() (*postgres.DB, error) {
User: "vdbm", User: "vdbm",
Password: "password", Password: "password",
Hostname: "localhost", Hostname: "localhost",
Name: "vulcanize_public", Name: "vulcanize_testing",
Port: 8077, Port: 8077,
}) })
return postgres.NewDB(uri, postgres.ConnectionConfig{}, node.Info{}) return postgres.NewDB(uri, postgres.ConnectionConfig{}, node.Info{})

View File

@ -1,2 +1,5 @@
docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d db # Clear up existing docker images and volume.
docker-compose down --remove-orphans --volumes
docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db
PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8077 DATABASE_PASSWORD=password DATABASE_HOSTNAME=127.0.0.1 make test PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8077 DATABASE_PASSWORD=password DATABASE_HOSTNAME=127.0.0.1 make test