Skip to content

makerdao-dux/govpollingdb-postgres

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

govpollingdb-postgres

This repo will create a docker image out of an SQL dump for use in our e2e testing setup. The created docker image is a base for the postgres database required by the gov-polling-db. These instructions assume you are already running the docker services from The Governance Portal and you have modified the database with your desired changes.

To update this docker image, follow these steps:

  1. Attach to the running docker image:
docker exec -it <YOUR_CONTAINER_ID> /bin/bash
  1. Make a SQL dump of the database, this provides docker with the initial data when creating the new image.
pg_dump -U user database > gpdb.sql

  1. Type exit to exit the container. Now copy the SQL file to this directory
docker cp <YOUR_CONTAINER_ID>:/gpdb.sql .
  1. Make a TAR backup of the database. This is copied to the filesystem and restored between tests for the Governance Portal. You may need to delete the file if it already exists.
docker exec -it postgres-vulcan2x-arbitrum pg_dump -F t database > gpdb.tar -U user
  1. Build the new image
docker build -t makerdaodux/govpolldb-postgres:latest ./
  1. Push the image to dockerhub
docker push makerdaodux/govpolldb-postgres:latest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published