[UPD] refactoring and new scripts

This commit is contained in:
Ivan Bock
2020-11-02 20:04:04 +01:00
parent 3e71de1cfb
commit 68cce3aa88
9 changed files with 182 additions and 81 deletions

8
vm-new-db.sh Executable file
View File

@@ -0,0 +1,8 @@
#!/usr/bin/env bash
NAME=$1
DB_NAME=$2
echo "### Create Db from Template"
multipass exec $NAME -- sudo -u postgres psql -c "CREATE DATABASE $DB_NAME WITH OWNER=ubuntu;"
multipass exec $NAME -- sudo -u postgres psql -d $DB_NAME -f /home/ubuntu/db/zdc-template-db.sql