Divio/DjangoCMS – import a DB dump

This is based on http://support.divio.com/local-development/divio-shell/how-to-interact-with-your-local-projects-database

First, get rid of the old db:

docker ps
docker stop projectname_db_1
docker rm projectname_db_1
docker-compose up db

then import

cat db-dump.sql | docker exec -i projectname_db_1 psql -U postgres db