Closed kshitij10496 closed 5 years ago
@kshitij10496 To make what we discussed during the demo day, the steps would look something like this:
pg_restore
to the appropriate database.The script should be fairly simple, I think this list of commands should give you a good idea of what you need to write (I will write it when I get time, posting this here just in case you are also working on this parallelly)
PG_CONTAINER=`docker ps --format '{{ .Names }}' | grep pg`
docker cp $1 $PG_CONTAINER:/
docker exec $PG_CONTAINER pg_restore -h postgres -U postgres $DB_NAME < $1
I think this should allow us to configure the hostname, database, user and password on the API container. (The last line of the above script will just be pg_restore $DB_NAME < $DUMP_FILE_NAME
once we use the pgpass
file)
Thanks a lot @icyflame for the follow-up. 😃
Feel free to send in a fix anytime you get time. I hope you have push access to this branch, if not, let me know.
@kshitij10496 I opened a new PR. :slightly_smiling_face: I hope that's okay? Your commits are preserved in that as well.
Closing this in favour of #50
Fixes #39