summaryrefslogtreecommitdiffstats
path: root/vagrant_scripts/appdb_bootstrap.sh
diff options
context:
space:
mode:
Diffstat (limited to 'vagrant_scripts/appdb_bootstrap.sh')
-rwxr-xr-xvagrant_scripts/appdb_bootstrap.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/vagrant_scripts/appdb_bootstrap.sh b/vagrant_scripts/appdb_bootstrap.sh
new file mode 100755
index 0000000..b1c4053
--- /dev/null
+++ b/vagrant_scripts/appdb_bootstrap.sh
@@ -0,0 +1,13 @@
+
+# no login required for pgpool
+echo "host all all 10.0.0.20/32 trust" >> /etc/postgresql/9.3/main/pg_hba.conf
+service postgresql reload
+
+# initialize the sqlfiddle central database, which has all sqlfiddle-specific data structures
+createdb -U postgres -E UTF8 sqlfiddle
+psql -U postgres sqlfiddle < /vagrant/src/main/resources/db/sqlfiddle/schema.sql
+psql -U postgres sqlfiddle < /vagrant/src/main/resources/db/sqlfiddle/data.sql
+
+# initialize the openidm repository
+psql -U postgres < /vagrant/src/main/resources/db/openidm/createuser.pgsql
+psql -U openidm < /vagrant/src/main/resources/db/openidm/openidm.pgsql \ No newline at end of file