#!/bin/sh

set -e

docker exec -i medicine-stack-postgres psql -c 'DROP DATABASE IF EXISTS medicine' --username=postgres;
docker exec -i medicine-stack-postgres psql -c 'CREATE DATABASE medicine' --username=postgres;
docker exec medicine-stack-postgres pg_restore --dbname=medicine /files/database.tar.gz --username=postgres;
